Eclipse does not recognize content of persistence.xml

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

    I came accross the same problem. Goto project properties -> Java build path -> source , remove */.java excluded attribute of src/main/resources source. Then add META-INF/persistence.xml. Then restart eclipse. You should persistence.xml under JPA Content in Project explorer. After that revert your changes.

    Well, what I suggest seem stupid, but magically it works. By the way my eclipse version is 3.6.

提交回复
热议问题