Uploaded image for project: 'z- Hibernate Metamodel Generator'
  1. METAGEN-92

Hibernate Metamodel Generator is not aware of persistence.xml for JPA 2.1

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0.Final
    • Fix Version/s: 1.3.0.Final
    • Component/s: processor
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true

      Description

      I'm using a snapshot of WildFly Alpha2.

      Hibernate Metamodel Generator is only aware of JPA 2.0. If I use a persistence.xml with the new namespace for JPA 2.1, then I get the following (serious?) warning during compilation. Using orm.xml for JPA 2.1 results in a similar warning.

      [WARNING] Hibernate JPA 2 Static-Metamodel Generator 1.2.0.Final
       [WARNING] Error unmarshalling /META-INF/persistence.xml with exception :
       javax.xml.bind.UnmarshalException
       â– with linked exception:
      [org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 28; cvc-elt.1: Deklaration des Elements "persistence" kann nicht gefunden werden.]
      

      This is the beginning of persistence.xml:

       <?xml version="1.0"?>
      
      <!--
       <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_2_0.xsd"
       version="2.0">
       -->
       <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
       version="2.1"> <!-- line 12 -->
       <persistence-unit name="de.shop.PU">
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: