-1

I have a problem that I couldn't fix it by myself. It is about JDO 3.0 and Maven. I'm follow this Tutorial however it don't explain nothing about how should I setup the POM.xml. I did a few researches on the internet to setup the pom.xml and you can see the result bellow, however oblivious is not working and have no idea how to setup. Please can you help me? Thanks

    <!-- JDO 3.0.1 -->  
    <dependency>
        <groupId>javax.jdo</groupId>
        <artifactId>jdo-api</artifactId>
        <version>3.0.1</version>
    </dependency>

    <!-- Datanucleus 3.1.3 -->
    <dependency>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-api-jdo</artifactId>
        <version>3.1.3</version>
    </dependency>
    <dependency>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-core</artifactId>
        <version>3.1.3</version>
    </dependency>
    <dependency>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-enhancer</artifactId>
        <version>3.1.1</version>
    </dependency>

    <!-- Datanucleus Appengine 2.1.2 -->
    <dependency>
        <groupId>com.google.appengine.orm</groupId>
        <artifactId>datanucleus-appengine</artifactId>
        <version>2.1.2</version>
    </dependency>   
  • perhaps define if you are using as a datastore "GAE/Datastore" (what that tutorial you linked is for) or MySQL (aka google-cloud-sql). –  Aug 26 '14 at 10:17
  • Yes I'm using GAE/Datastore. – Ronildo Braga Junior Aug 26 '14 at 10:26
  • I first started with this tutorial https://developers.google.com/appengine/docs/java/gettingstarted/introduction and now I'm following this tutorial https://developers.google.com/appengine/docs/java/datastore/jdo/overview-dn2 but is not working because dont explain how to config the pom.xml – Ronildo Braga Junior Aug 26 '14 at 10:28

1 Answers1

0

GAE/Datastore requires the jar "datanucleus-appengine" in the CLASSPATH (NOT "datanucleus-rdbms"), and has to have the right (old) version of DataNucleus libraries for it to work. If you use v2.1.2 of the "datanucleus-appengine" plugin, then you must use DataNucleus jars v3.1.x, following http://code.google.com/p/datanucleus-appengine/wiki/Compatibility

  • Thanks Billy. I think I did one step forward however I still have an problem. Please have a look how is the pom.xml(I edited the original post) and what is happening when I try persist one object. Caused by: javax.jdo.JDOFatalUserException: Class org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory was not found – Ronildo Braga Junior Aug 26 '14 at 22:30
  • I found this http://stackoverflow.com/questions/13862507/datastorejdopersistencemanagerfactory-class-not-found-exception-when-configuring that looks the same problem that I have however I couldn't fix it. Please can you help me? Thanks – Ronildo Braga Junior Aug 26 '14 at 22:31
  • And what is the real exception?, that is the cause of that one. The log tells you plenty –  Aug 27 '14 at 07:07
  • Hi again Billy. Thanks for your attention, I have to say I changed the persistence engine and now I'm using Objectify that looks much better and easier to set up. Now it's everything working so I think I will keep this. Thanks again. – Ronildo Braga Junior Aug 28 '14 at 01:04