Eclipse does not recognize content of persistence.xml

前端 未结 27 1746
野趣味
野趣味 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 20:57

    I had the same error, but solved it in a different way.

    The thing is that META-INF must be considered a source folder, and as it was under /ejbModule (mine is a EJB project) I assumed it was on the build path. And it wasn't. Actually it was on "exclude" list on build path. So, all I did was right-click the META-INF folder on Project Explorer view and selected INCLUDE on Build Path menu. Then I asked Eclipse to clean the project and everything was right again.

    Best Regards.

提交回复
热议问题