Question

I am trying to configure JDO on Appengine but every time I try to persist something I get an java.lang.ClassNotFoundException: org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory Searching for this error I only got that I could have an error in my jdoconfig.xml But I explicitly declare that I want to use this class my jdoconfig.xml, which I posted below.

<?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>
Was it helpful?

Solution

decide if you are using GAE JDO plugin v1.0 (JDO2.x) or GAE JDO plugin v2.0 (JDO3.0) which kinda decides which jars you have in the classpath, and hence what entries you put in your jdoconfig.xml

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top