jpa-spec
  1. jpa-spec
  2. JPA_SPEC-45

Persistence.xml does not support 2.1 persistence xsd

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Labels:
      None
    • Environment:

      Glass fish b72

      Description

      In persistence.xml , version attribute and XSD version should still be specified as 2.0, else I am getting error when I deployed in teh glassfish server version glassfish-4.0-b72.
      In public draft document, I find below
      "The container must validate the persistence.xml file against the persistence_2_1.xsd, persistence_2_0.xsd, or persistence_1_0.xsd schema in accordance with the version specified by the persistence.xml file and report any validation errors."
      Hence , as per it , shouldn't version 2.1 version value be allowed in the persistence.xml, or am I missing something?

      The exception

      Caused by: org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 121; cvc-complex-type.3.1: Value '2.1' of attribute 'version' of element 'persistence' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '2.0'.
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)

      SEVERE glassfish 4.0 javax.enterprise.system.core _ThreadID=45;_ThreadName=AutoDeployer;_TimeMillis=1359302785077;_LevelValue=1000;_MessageID=NCLS-CORE-0026; Exception during lifecycle processing
      java.io.IOException: org.xml.sax.SAXParseExceptionpublicId: http://www.oracle.com/technetwork/java/index.html; lineNumber: 6; columnNumber: 41; Deployment descriptor file META-INF/persistence.xml in archive [FoodCourtServices.jar]. s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'var _U = "undefined";
      var g_HttpRelativeWebRoot = "/ocom/";'.

        Activity

        niveditadixitp created issue -
        ldemichiel made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Invalid [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            niveditadixitp
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: