AppEngine上配置JDO时DatastoreJDOPersistenceManagerFact

2019-10-17 12:13发布

我想AppEngine上配置JDO,但每次我试图坚持的东西,我得到一个抛出java.lang.ClassNotFoundException:org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory搜索这个错误我只拿到了,我可以在一个错误我jdoconfig.xml但我明确地声明,我想使用这个类我jdoconfig.xml,我贴在下面。

<?xml version="1.0" encoding="utf-8"?>
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
  <persistence-manager-factory name="transactions-optional">
    <property name="javax.jdo.PersistenceManagerFactoryClass"
            value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
        <property name="javax.jdo.option.ConnectionURL" value="appengine"/>
        <property name="javax.jdo.option.NontransactionalRead" value="true"/>
        <property name="javax.jdo.option.NontransactionalWrite" value="true"/>
        <property name="javax.jdo.option.RetainValues" value="true"/>
        <property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
  </persistence-manager-factory>
</jdoconfig>

Answer 1:

决定,如果你正在使用GAE JDO插件V1.0(JDO2.x)或GAE JDO插件V2.0(JDO3.0),它还挺决定哪个罐子你在类路径,因此哪些条目你把你的jdoconfig.xml



文章来源: DatastoreJDOPersistenceManagerFactory class not found exception when configuring JDO on Appengine