aspose file tools*
The moose likes GWT and the fly likes GAE JPA Can't get Vogella example to work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "GAE JPA Can Watch "GAE JPA Can New topic
Author

GAE JPA Can't get Vogella example to work

Laurence Turpin
Greenhorn

Joined: May 21, 2012
Posts: 19
Hello,

I'm using Windows 7, Eclipse Indigo and GAE 1.6.6
I'm trying to learn how to use Java Persistence API on Google App Engine.
At this moment I'm trying to do the example from the following site vogella

I have the following package structure:

When I run the program it fails with an http error 500 and says javax persistence is a restricted class



Here is the code for the PersistsServlet.java file



Here is the code for EMFService.java


Here is the Todo.java file:


Here is the web.xml file:


This is the persistence.xml


and finally the error trace
Laurence Turpin
Greenhorn

Joined: May 21, 2012
Posts: 19
At last I have managed to get this to work.
I reinstalled a new version of eclipse Juno release.
and the latest version of the gae plugin 4.2
The latest plugin includes a persistence.xml
The difference between the persistence.xml that I was using and this one
is in the <provider> section.

In the new persistence.xml it is:

<provider>
org.datanucleus.api.jpa.PersistenceProviderImpl
</provider>

Anyway all is working now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GAE JPA Can't get Vogella example to work
 
Similar Threads
Error starting Applikation in Eclipse Developer Mode
Error when calling EntityManager
Problem with Ext - GWT and hibernate (without Spring)
Problems connecting to a database
getting error when deploying web app in weblogic 10.0