Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

javax.persistence.PersistenceException: No Persistence provider for EntityManager - WebApplication

 
David de Lucca
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys!

I have a persistence.xml file inside my web application and it only works after that i try to access the context on browser. If i do deploy and don't try to access the application ( http://localhost:8080/MyApp ), it gives me an exception:


javax.persistence.PersistenceException: No Persistence provider for EntityManager named


I have some tasks that runs independently access or not the application and when the tasks run before access, i get that exception.

How can i fix it?

JPAUtil.java


persistence.xml


Thanks.

David
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!