1

我是谷歌应用引擎和数据核的新手。以下错误似乎是一些 jar 问题,但我不确定 Data nucleus 的哪些 jar 应该在我的 war/web-inf/classes 文件夹中,哪些 jar 应该在 app engine SDK 文件夹中。我正在使用 App 引擎 SDK 1.7.0。我在数据核增强方面没有问题。

Caused by: java.lang.NoSuchMethodError: org.datanucleus.plugin.PluginManager.<init>(Lorg/datanucleus/PersistenceConfiguration;Lorg/datanucleus/ClassLoaderResolver;)V
    at org.datanucleus.OMFContext.<init>(OMFContext.java:159)
    at org.datanucleus.OMFContext.<init>(OMFContext.java:141)
    at org.datanucleus.ObjectManagerFactoryImpl.initialiseOMFContext(ObjectManagerFactoryImpl.java:144)
    at org.datanucleus.jdo.JDOPersistenceManagerFactory.initialiseProperties(JDOPersistenceManagerFactory.java:316)
    at org.datanucleus.jdo.JDOPersistenceManagerFactory.<init>(JDOPersistenceManagerFactory.java:260)
    at org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory.<init>(DatastoreJDOPersistenceManagerFactory.java:71)
<continued in next message>

在应用引擎 SDK 文件夹中还有其他各种文件夹,它们包含不同版本的相同数据核文件。

*编辑:* 将 SDK 更新到 1.7.3 后,我注意到 appengine-java-sdk-1.7.3\lib\user\orm 文件夹中有以下 JARS,这些是那里存在的数据核 jar。

datanucleus-core-1.1.5
datanucleus-jpa-1.1.5
datanucleus-appengine-1.0.10.final
jdo2-api-2.3-eb

我的 war/web-inf/lib 包含所有上述罐子和以下罐子:

appengine-api-1.0-sdk-1.7.3.jar

我的例外已经改变,现在是:

    2012-12-12 12:49:17.397
org.datanucleus.plugin.NonManagedPluginRegistry resolveConstraints: Bundle "org.datanucleus.api.jdo" requires "org.datanucleus" version "3.1.1" but the resolved bundle has version "3.1.1" which is outside the expected range.
E 2012-12-12 12:49:17.534
org.datanucleus.api.ApiAdapterFactory getApiAdapter: Error : An error occurred trying to instantiate an instance of the adapter "org.datanucleus.api.jdo.JDOAdapter" : NUCLEUS_CONTEXT_LOADER
W 2012-12-12 12:49:18.182
org.datanucleus.OMFContext setApi: There is no available API adapter "JDO". Using existing adapter.
E 2012-12-12 12:49:18.182
org.datanucleus.api.ApiAdapterFactory getApiAdapter: Error : An error occurred trying to instantiate an instance of the adapter "org.datanucleus.api.jdo.JDOAdapter" : Could not initialize class org.datanucleus.api.jdo.JDOAdapter
4

1 回答 1

1

Appengine JDO/JPA 插件 Wiki很好地定义了每个版本的插件需要哪些 DataNucleus jar

于 2012-12-11T11:55:30.133 回答