运行时异常 - Datanucleus和GAE

时间:2012-12-11 11:03:38

标签: java eclipse google-app-engine datanucleus

我是Google应用引擎和数据核心的新手。以下错误似乎是一些jar问题但我不确定哪个数据核的jar应该在我的war / web-inf / classes文件夹中以及哪些jar应该在app引擎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>

在app engine SDK文件夹中有各种其他文件夹,它们包含相同数据核心文件的不同版本。

* 编辑:* 将SDK更新到1.7.3后,我在appengine-java-sdk-1.7.3 \ lib \ user \ orm文件夹中注意到以下JARS,这些是那里的datanucleus 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

1 个答案:

答案 0 :(得分:1)

Appengine JDO / JPA插件Wiki defines well enough每个插件版本都需要DataNucleus罐子