Eclipse does not recognize content of persistence.xml

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

    just solved the issue by doing this:

    1. in schemaLocation, i deleted "h ttp://java.sun.com/xml/ns/persistence/" making it:

    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence persistence_2_0.xsd"

    1. i added at the top.

    2. i clean build the project. error's gone.

    3. i added the "h ttp://java.sun.com/xml/ns/persistence/" again:

    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"

    1. i clean build the project. error's not there.

    2. i deleted at the top.

    3. i clean build the project. error's still not there.

    hope this helps someone in the future.

提交回复
热议问题