Reputation: 9363
I try to start an Google appengine application in my eclipse.
I have the Google plugin and I set the sdk for my application.
But, when I start this one, I get the following error:
java.lang.ClassNotFoundException: org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider
However, this class is present in the sdk which is present in my classpath.
Why Appengine doesn't find this class ?
Thanks.
Upvotes: 3
Views: 698
Reputation: 31
https://developers.google.com/appengine/docs/java/datastore/jpa/overview-dn2
Please try to follow the steps to add JPA and datastore JARs in the app's war/WEB-INF/lib/ directory.
All the jars in the appengine-java-sdk/lib/opt/user/datanucleus/v2/ directory.
I met the same problem and followed the steps on that webpage. Now my code works well.
I believe that problems happens because we are using JPA 2.0 instead of JPA 1.0 now.
Also, please make sure you are using org.datanucleus.api.jpa.PersistenceProviderImpl as the provider instead of org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider. At least I used the new provider because I am developing GAE projects using the newest GAE plug-in
Good luck.
Upvotes: 3