7
我使用谷歌應用程序引擎(AppEngine上的Java-SDK-1.6.6)使用JDO和Maven(Maven的GAE-插件)爲該項目的應用結構和構建。使用DataNucleus增強器增強我的域類時,構建是成功的。類org.datanucleus.api.jdo.PersistenceManagerFactoryClass未發現
運行應用程序時,我面對這個問題:類org.datanucleus.api.jdo.PersistenceManagerFactoryClass沒有被發現。任何人都可以請指教。由於
PS:我已經做了的grep(在Linux上)發現在App Engine SDK文件夾中的PersistenceManagerFactoryClass,我找不到它。
Could not instantiate bean class [com.peerbuccoss.apps.mtp.dao.impl.CommonDaoImpl]: Constructor threw exception; nested exception is javax.jdo.JDOFatalUserException: Class org.datanucleus.api.jdo.PersistenceManagerFactoryClass was not found.
NestedThrowables:
java.lang.ClassNotFoundException: org.datanucleus.api.jdo.PersistenceManagerFactoryClass:
java.lang.ClassNotFoundException: org.datanucleus.api.jdo.PersistenceManagerFactoryClass
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:176)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at javax.jdo.JDOHelper$18.run(JDOHelper.java:2018)
at javax.jdo.JDOHelper$18.run(JDOHelper.java:2017)
at java.security.AccessController.doPrivileged(Native Method)
at javax.jdo.JDOHelper.forName(JDOHelper.java:2015)
at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1162)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:808)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:1093)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:919)
我更改屬性javax.jdo.PersistenceManagerFactoryClass與隨着2.1.2版本,你必須使用以下的PersistenceManagerFactoryClass更新jdconfig.xml值org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory,它工作正常。 –
所以你使用GAE JDO插件的v1。顯然這是古老的,所以稍後可能會遇到問題。最好使用該插件的v2 – DataNucleus
@DataNucleus感謝您的回覆。我從V1遷移到v2和利用谷歌(https://developers.google.com/appengine/docs/java/datastore/jdo/overview-dn2#Creating_the_jdoconfig_xml_File),我有同樣的問題「組織級的配置。未找到datanucleus.api.jdo.PersistenceManagerFactoryClass「。 –