Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in Standalone persistence

 
Amirr Rafique
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers

I am trying to use persistence in a standalone application. My persistence.xml is in META-INF directory of my jar file. This jar file also contain the the standalone application. On trying to run the application I get following exception



Please help

Thanks
 
Amirr Rafique
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys any help on this
 
Jun Liu
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exception said there is no persistence provider for the entity manager. Persistence provider should be defined in persistence.xml as:

Here I am using the EclipseLink as my persistence provider. Please check if your persistence.xml constains <provider> element under <persistence-unit>
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Show us your persistence.xml, and tell us how you executed your client.
 
Amirr Rafique
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please see below my persistence.xml


I am running my class from jar file and persistence.xml is in META-INF directory of the jar file.

Looking forward for your expert opinion

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic