No Persistence provider for EntityManager named

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

    I faced the same problem, but on EclipseLink version 2.5.0.

    I solved my problem by adding yet another jar file which was necessarily (javax.persistence_2.1.0.v201304241213.jar.jar);

    Jars needed:
    - javax.persistence_2.1.0.v201304241213.jar
    - eclipselink.jar
    - jdbc.jar (depending on the database used).

    I hope this helps.

提交回复
热议问题