probably a version conflict.

What does mvn dependency:tree return?

I think datanucleus was implemented for an older version of neo4 which is not 
fitting your Neo4j version.

Michael

Am 16.05.2014 um 11:24 schrieb Moop <[email protected]>:

> Hi,
> I'm using DataNucleus as JPA provider for Neo4j. I got an error that I think 
> is related more to Neo4j than to DataNucleus.
> 
> java.lang.NoSuchMethodError: 
> org.neo4j.cypher.javacompat.ExecutionResult.iterator()Lorg/neo4j/graphdb/ResourceIterator
> 
> The problem occurs when I try to commit in the transaction : 
> tx.commit();
> 
> 
> EntityManagerFactory emf = Persistence.createEntityManagerFactory("Tutorial");
> 
>         System.out.println("DataNucleus Tutorial with JPA");
>         System.out.println("=============================");
> 
>         // Persistence of a Product and a Book.
>         EntityManager em = emf.createEntityManager();
>         EntityTransaction tx = em.getTransaction();
>         try
>         {
>             tx.begin();
> 
>             Inventory inv = new Inventory("My Inventory");
>             Product product = new Product("Sony Discman", "A standard discman 
> from Sony", 200.00);
>             inv.getProducts().add(product);
>             Book book = new Book("Lord of the Rings by Tolkien", "The classic 
> story", 49.99, "JRR Tolkien", 
>                 "12345678", "MyBooks Factory");
>             inv.getProducts().add(book);
> 
>             em.persist(inv);
> 
>             tx.commit();
>             System.out.println("Product and Book have been persisted");
>         }
>         catch (Exception e)
>         {
>             NucleusLogger.GENERAL.error(">> Exception persisting data", e);
>             System.err.println("Error persisting data : " + e.getMessage());
>             return;
>         }
>         finally
>         {
>             if (tx.isActive())
>             {
>                 tx.rollback();
>             }
>             em.close();
>         }
> 
>  
> I just need an explanation of what could be the reason of the error. I know 
> that NoSuchMethodError means that the class I'm calling has no (valide) main, 
> but I can't figure out why does it looking for a main method in the invoked 
> class. I think of compatibility issue, can you provide some help please?
> 
> If you need some additional information to help you help me out, just ask for 
> it.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to