Eclipse does not recognize content of persistence.xml

前端 未结 27 2358
野趣味
野趣味 2021-01-30 20:44

Im getting the following error in eclipse:

The persistence.xml file does not have recognized content.

My persistence.xml file works great in my application but e

27条回答
  •  渐次进展
    2021-01-30 21:10

    Any updates on this? This is still an issue it seems right? If I create a JPA project, convert to Maven project, the error appears and I can't get rid of it with any of the recommended methods.

    Edit

    Ok so after maneuvering some folders around so its in an actual Maven directory format, it still didn't work - but creating a linked folder under src/main/java named META-INF, linked to src/main/resources/META-INF it was resolved.

    Creating a Maven project and adding the JPA facet works also, but only because the JPA facet adds the META-INF and persistence.xml file to src/main/java which I don't think is exactly right.

提交回复
热议问题