Skip to main content

[jpa-spec issues] persistence XSD version in persistence.xml

  • From: Nivedita Dixit < >
  • To: ,
  • Cc: kishor < >
  • Subject: [jpa-spec issues] persistence XSD version in persistence.xml
  • Date: Sun, 27 Jan 2013 22:22:08 +0530

Hi All,

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 , shouldnt 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'.

|SEVERE|glassfish 4.0|javax.enterprise.system.core|_ThreadID=45;_ThreadName=AutoDeployer;_TimeMillis=1359302785077;_LevelValue=1000;_MessageID=NCLS-CORE-0026;|Exception during lifecycle processing org.xml.sax.SAXParseExceptionpublicId:; 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/";'.

[jpa-spec issues] persistence XSD version in persistence.xml

Nivedita Dixit 01/27/2013
Please Confirm