manojo
manojo

Reputation: 29

Google App Engine using maven

I've been trying to create a single project which can run both on sql and gae (where the 'datanucleus.properties' file needs to be changed) under a single maven folder structure. I first tried to get the Greeting example on the GAE website using mysql (this now works). Then, inspiring myself from beardedgeeks tutorial, I have tried to add the required dependencies so as to run the stuff on gae. By typing in mvn gae:run, however, I get the following error, posted at http://pastebin.com/fJ7c7xfx. I have spent a large amount of time searching google etc. for answers, but haven't been able to advance my case.

I would be glad to get some pointers. Cheers, manojo

Upvotes: 1

Views: 1211

Answers (2)

Pascal Thivent
Pascal Thivent

Reputation: 570355

This question is tagged [JDO] but the following trace:

Caused by: java.lang.ClassNotFoundException: javax.persistence.InheritanceType
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:151)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 77 more

suggests that you're missing the JPA API jar (provided by org.apache.geronimo.specs:geronimo-jpa_1.0_spec:1.1.1).

<dependency>
  <groupId>org.apache.geronimo.specs</groupId>
  <artifactId>geronimo-jpa_3.0_spec</artifactId>
  <version>1.1.1</version>
</dependency>

Since you're not using JPA, you shouldn't have to do that but it appears that the JPA API is somehow referenced by the datanucleus appengine plugin as explained by @Datanucleus.

Upvotes: 1

DataNucleus
DataNucleus

Reputation: 15577

The people at Google unwisely put a reference in to that JPA class in their plugin and so it requires that you have the jpa.jar (the Geronimo one will do) in your CLASSPATH. An issue was raised on them a long time ago to fix it, but sadly they don't actively maintain their plugin.

Upvotes: 0

Related Questions