aspose file tools*
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

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Problem in Standalone persistence" Watch "Problem in Standalone persistence" New topic

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


"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

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é

Joined: Nov 24, 2005
Posts: 14687

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

I agree. Here's the link:
subject: Problem in Standalone persistence
Similar Threads
Sun App Server 8.2 + JAVA Persistence + Creator 2_1
server vs standalone mode
How to access PersistenceUnit from servlet?
JPA Newbie Question
Secure Java source code