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