A correct starting tag for the entity mappings file for JPA 2.0 was
<entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_1_0.xsd">
What are the required corrections for JPA 2.1?
I tried
<entity-mappings version="2.1" xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/orm">
But this gives the error:
No grammar constraints (DTD or XML Schema) referenced in the document.
As per what the JPA 2.1 spec says perhaps ;-) or the docs of a JPA 2.1 implementation that tells you
Change java.sun.com to xmlns.jcp.org
Change orm_1_0 to orm_2_1
Change version="1.0" to version="2.1"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With