No Persistence provider for EntityManager named

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

    Mine got resolved by adding info in persistence.xml e.g. org.eclipse.persistence.jpa.PersistenceProvider and then making sure you have the library on classpath e.g. in Maven add dependency like

    
      org.eclipse.persistence
      eclipselink
      2.5.0
    
    

提交回复
热议问题