[JPA_SPEC-45] Persistence.xml does not support 2.1 persistence xsd Created: 03/Feb/13  Updated: 22/Feb/13  Resolved: 22/Feb/13

Status: Closed
Project: jpa-spec
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: niveditadixitp Assignee: Unassigned
Resolution: Invalid Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
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/";'.


 Comments   
Comment by ldemichiel [ 22/Feb/13 ]

The persistence_2_1.xsd schema was recently created and should now be usable. Updating the version number in a previous version of the xsd will definitely not work as the namespace has changed.

Generated at Mon Aug 03 09:22:17 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.