-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Question on the version tag in the XML mapping files...
PostPosted: Tue Nov 11, 2003 5:35 pm 
Newbie

Joined: Tue Nov 11, 2003 5:25 pm
Posts: 17
Location: Milwaukee, Wi
The addition of a version tag seems to have caused some errors in my Hibernate mappings (Hibernate v2.0.3). Is this correct?

<version
name="updateSequence"
column="UPDATE_SEQUENCE"
type="long">
</version>

Any help would be appreciated. I am currently getting the error below:

15:20:08,255 ERROR XMLHelper:37 - Error parsing XML: XML InputStream(97)
org.xml.sax.SAXParseException: The content of element type "version" must match "EMPTY".
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213)
at org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1851)
at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1490)
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1204)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at org.dom4j.io.SAXReader.read(SAXReader.java:339)
at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252)
at net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:286)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 11, 2003 5:52 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
The non-CVS version of the DTD has no additional tags possible in the version attribute. So use this:
<version
name="updateSequence"
column="UPDATE_SEQUENCE"
type="long"
/>

Your original approach will work with the lastest version of the DTD b5/b6.


Top
 Profile  
 
 Post subject: Thanks!
PostPosted: Tue Nov 11, 2003 6:14 pm 
Newbie

Joined: Tue Nov 11, 2003 5:25 pm
Posts: 17
Location: Milwaukee, Wi
That works beautifully! I also moved the version tag up in front of the property tags.

Thanks for the quick reply.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.