问题
i have upgraded to appengine 1.7.4 and something is now broken.
when deploying to local dev the appengine errors with the following.
Class "com.google.appengine.datanucleus.DatastoreManager" was not found in the C
LASSPATH. Please check your specification and your CLASSPATH.
org.datanucleus.exceptions.ClassNotResolvedException: Class "com.google.appengin
e.datanucleus.DatastoreManager" was not found in the CLASSPATH. Please check you
r specification and your CLASSPATH.
This is NOT a java.lang.ClassNotFoundException but a org.datanucleus.exceptions.ClassNotResolvedException
my libs are
appengine-api-1.0-sdk-1.7.4
appengine-api-labs-1.7.4
datanucleus-api-jdo-3.2.0-m3
datanucleus-api-jpa-3.2.0-m3
datanucleus-appengine-2.1.1
datanucleus-core-3.2.0-m3
datanucleus-enhancer-3.1.1
it is build using maven.
the DataNucleus App Engine Plugin Compatibility http://code.google.com/p/datanucleus-appengine/wiki/Compatibility states
3.0:
Requires DataNucleus 3.2+ (core, api-jdo, api-jpa).
Requires SDK 1.7.0+
The datanucleus-appengine-2.1.1 pom has dependancies of
org.datanucleus datanucleus-api-jdo [3.1.1, 3.2)
org.datanucleus datanucleus-api-jpa [3.1.1, 3.2)
org.datanucleus datanucleus-core [3.1.1, 3.2)
org.datanucleus datanucleus-enhancer [3.1.0-release, )
something is wrong with the version of the libs but i cant determine it.
what is the correct dependency for DN plugin and the sdk 1.7.4?
-lp
回答1:
Why have you got "datanucleus-api-jdo" AND "datanucleus-api-jpa" in the CLASSPATH? Decide which API you're using and use that one. Where are the other dependencies ? jdo-api.jar of persistence-api.jar ?
You can't use DataNUcleus 3.2 unless you're using SVN trunk of the datanucleus-appengine plugin, as shown clearly on http://code.google.com/p/datanucleus-appengine/wiki/Compatibility
回答2:
OK the issue is that the plugin 2.1.1 has a dependency on DN 3.2x. As @datanucleus has mentioned this is incorrect, it should be limited to DN 3.1.1.
by manual setting the dependency of the plugin to DN 3.1.1. everything now works.
thanks @Datanucleus
来源:https://stackoverflow.com/questions/14765259/appengine-1-7-4-sdk-and-com-google-appengine-datanucleus-datastoremanager-not-fo