appengine 1.7.4 sdk and com.google.appengine.datan

2019-08-16 21:28发布

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

2条回答
SAY GOODBYE
2楼-- · 2019-08-16 22:10

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

查看更多
姐就是有狂的资本
3楼-- · 2019-08-16 22:13

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

查看更多
登录 后发表回答