No Persistence provider for EntityManager named

前端 未结 30 2404
甜味超标
甜味超标 2020-11-22 03:45

I have my persistence.xml with the same name using TopLink under the META-INF directory. Then, I have my code calling it with:

30条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-22 04:26

    You need to add the hibernate-entitymanager-x.jar in the classpath.

    In Hibernate 4.x, if the jar is present, then no need to add the org.hibernate.ejb.HibernatePersistence in persistence.xml file.

提交回复
热议问题