• Post Reply Bookmark Topic Watch Topic
  • New Topic

Persistence Exception

 
Richard Collins
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am getting Persistence Exception while trying to run the JPA client.

The cleint is not able to recognize the persistence.xml which is present in the META-INF directory.

Following is the exception.

Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named EmployeeService
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:89)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
at client.EmployeeClient.main(EmployeeClient.java:16)


If any of you have a clue about the above exception please let me know.
 
Richard Collins
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I got the answer. I had to put the toplink-essentials-agent.jar in the class path.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!