The file persistence.xml exists to define the various persistence-units that are to be available for persistence using JPA. Each persistence-unit defines a set of classes and their mapping characteristics when persisting them. The file persistence.xml has to match the format defined by the XSD for that file Here is an example valid for persistence.xml files with XSD specification
<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
...
</persistence>Your MetaData should match the XSD specification. |