I have created an appengine which runs fine and returns records from my Google cloud SQL db in debug mode. When I deploy the appegine and run the endpoint it errors. And the error I get in the appengine log is:
Caused by: org.datanucleus.exceptions.NucleusUserException: There is no available StoreManager of type "jdbc". Make sure that you have put the relevant DataNucleus store plugin in your CLASSPATH and if defining a connection via JNDI or DataSource you also need to provide persistence property "datanucleus.storeManagerType".
Here is a list or the jars in war\WEB-INF\lib directory:
- appengine-api-1.0-sdk-1.7.6
- appengine-api-labs
- appengine-endpoints
- appengine-jsr107cache-1.7.6
- asm-4.0
- com.sun.tools.xjc_2.2.0
- com.sun.xml.bind_2.2.0.v201004141950
- datanucleus-api-jdo-3.1.3
- datanucleus-api-jpa-3.1.3
- datanucleus-appengine-2.1.2
- datanucleus-core-3.1.3
- eclipselink
- eclipselink-jpa-modelgen_2.4.1.v20121003-ad44345
- gcm-server
- geronimo-jpa_2.0_spec-1.0
- javax.activation_1.1.0.v201108011116
- javax.mail_1.4.0.v201005080615
- javax.persistence_2.0.4.v201112161009
- javax.xml.bind_2.2.0.v201105210648
- javax.xml.stream_1.0.1.v201004272200
- jdo-api-3.0.1
- json_simple-1.1
- jsr107cache-1.1
- jta-1.1
- org.eclipse.persistence.jpars_2.4.1.v20121003-ad44345
Here is my persistence.xml:
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0">
<persistence-unit name="transactions-optional" transaction-type="RESOURCE_LOCAL">
<provider></provider>
<class>com.example.myapp.Class1</class>
<class>com.example.myapp.Class2</class>
<properties>
<property name="datanucleus.NontransactionalRead" value="true"/>
<property name="datanucleus.NontransactionalWrite" value="true"/>
<property name="javax.persistence.jdbc.driver" value="com.google.appengine.api.rdbms.AppEngineDriver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:google:rdbms://something.com:someproj:someapp/somedb"/>
<property name="javax.persistence.jdbc.user" value=""/>
<property name="javax.persistence.jdbc.password" value=""/>
</properties>
</persistence-unit>
</persistence>
Using: cloud sql JPA Datanucleous v2 SDK 1.7.6 Jre7
As it works fine in debug mode I dont understand what the problem might be as I am new to appengine. Please let me know if you need more information.
Thanks guys.