No Persistence provider for EntityManager named No Persistence provider for EntityManager named java java

No Persistence provider for EntityManager named


After <persistence-unit name="agisdb">, define the persistence provider name:

<provider>org.hibernate.ejb.HibernatePersistence</provider>


Put the "hibernate-entitymanager.jar" in the classpath of application.
For newer versions, you should use "hibernate-core.jar" instead of the deprecated hibernate-entitymanager

If you are running through some IDE, like Eclipse: Project Properties -> Java Build Path -> Libraries.

Otherwise put it in the /lib of your application.


Make sure that the persistence.xml file is in the directory: <webroot>/WEB-INF/classes/META-INF