• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

GAE JPA Can't get Vogella example to work

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic