Eclipse does not recognize content of persistence.xml

前端 未结 27 1728
野趣味
野趣味 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:11

    This problems occurs if you

    • Convert a JPA project to a Maven project or
    • Add the JPA facet to a Maven project.

    The solution is

    • Select Windows > Preferences > Validation
    • Disable the JPA Validator for both Manual validation and Build validation

    After changing these settings,then clean your project.

提交回复
热议问题