Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception while trying to run the sample in Chapter 2 in Pro EJB3  RSS feed

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

I am getting the following exception while trying to run the sample given in Chapter 2 of the Pro EJB3 book.

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)


I have the persistence.xml file inside the META-INF directory which is inside the jar file. I am getting this exception while trying to run the client. I have the jar in the classpath, but somehow it is not able to recognize the persistence.xml.

Any advice on this exception please.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Adam Gilchirst",
Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with display names get deleted.

FYI: I live in West Australia. We won't accept any variation on the same theme either.

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

Adam Gilchirst is my Favourite criketer, so I wanted to have his name. I am really sorry, to not to have abide by your rules.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!