permaculture playing cards*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Problem in Standalone persistence Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Problem in Standalone persistence" Watch "Problem in Standalone persistence" New topic
Author

Problem in Standalone persistence

Amirr Rafique
Ranch Hand

Joined: Nov 14, 2005
Posts: 324
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


"Know where to find the solution and how to use it - that's the secret of success."
Amirr Rafique
Ranch Hand

Joined: Nov 14, 2005
Posts: 324
Guys any help on this
Jun Liu
Greenhorn

Joined: Nov 15, 2005
Posts: 11
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

Show us your persistence.xml, and tell us how you executed your client.


[My Blog]
All roads lead to JavaRanch
Amirr Rafique
Ranch Hand

Joined: Nov 14, 2005
Posts: 324
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in Standalone persistence