This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GAE JPA Can't get Vogella example to work

 
Laurence Turpin
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic