No Persistence provider for EntityManager named

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

    If you're using Maven, it could be that it is not looking at the right place for the META-INF folder. Others have mentioned copying the folder, but another way that worked for me was to tell Maven where to look for it, using the tag. See: http://maven.apache.org/plugins/maven-resources-plugin/examples/resource-directory.html

提交回复
热议问题