No Persistence provider for EntityManager named

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

    I also had this error but the issue was the namespace uri in the persistence.xml.

    I replaced http://xmlns.jcp.org/xml/ns/persistence to http://java.sun.com/xml/ns/persistence and the version 2.1 to 2.0.

    It's now working.

提交回复
热议问题