views:

546

answers:

1

Has anyone successfully configured JDO datanucleus default to google app engine to work on a local database?

Why am I always getting an error in jdoconfig.xml when I have specified the property "datanucleus.storeManagerType" with value "rdbms." at the end part.

I tried googling but seems no luck.

Caused by: org.datanucleus.exceptions.NucleusUserException: There is no available StoreManager of type "rdbms". Please make sure you have specified "datanucleus.storeManagerType" correctly and that all relevant plugins are in the CLASSPATH

<persistence-manager-factory name="postgresql"> 
<property name="datanucleus.mapping.Schema" value="jdo"/>
<property name="javax.jdo.PersistenceManagerFactoryClass" value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/> 
<property name="datanucleus.ConnectionDriverName" value="org.postgresql.Driver"/> 
<property name="datanucleus.ConnectionURL" value="jdbc:postgresql://localhost:5432/jdo"/> 
<property name="datanucleus.ConnectionUserName" value="jdo"/> 
<property name="datanucleus.ConnectionPassword" value="jdo"/> 
<property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/> 
<property name="datanucleus.autoStartMechanism" value="None"/> 
<property name="datanucleus.autoCreateSchema" value="true"/> 
<property name="datanucleus.validateTables" value="true"/> 
<property name="datanucleus.validateConstraints" value="true"/> 
<property name="datanucleus.validateColumns" value="true"/> 
<property name="datanucleus.DetachAllOnCommit" value="true"/> 
<property name="datanucleus.maxFetchDepth" value="1"/> 
<property name="datanucleus.storeManagerType" value="rdbms"/>

code for PMF.java

private static final PersistenceManagerFactory pmfInstance =
JDOHelper.getPersistenceManagerFactory("postgresql");
+1  A: 

When using another datastore aside from the default app-engine sdk's "transaction-optional" datastore, you need to use another web application container such as apache-tomcat or jetty in order for the rdbms driver classes (ie, postgresql.jar-org.postgresql.Driver, mysql.jar com.mysql.jdbc.Driver) to work since google app engine inhibits your application to use the java.net.socket.* which is used by the database drivers

ivanceras