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
I had src/main/java/META-INF/persistence.xml
working fine in Eclipse with embedded Tomcat. Because it was not being copied into the Maven-built WAR, I moved it to src/main/resources/META-INF
.
Now src/main/resources/META-INF/persistence.xml
won't validate.
If rename to xyz_persistence.xml, it validates fine.
If rename to persistence.xml, it fails to validate.
When these annoying situations arise, I often find numerous different "solutions" like mine, most of which are not universally applicable.
So, here's my "solution", which I think it a hack to get around a bug:
To remove the error "persistence.xml file does not have recognized content" error, disable the JPA Validator:
You might need to clean and rebuild. Your mileage may vary.