No Persistence provider for EntityManager named

前端 未结 30 2011
甜味超标
甜味超标 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:21

    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.

提交回复
热议问题