-->
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.  [ 4 posts ] 
Author Message
 Post subject: SAXParseException: Element "class" does not allow
PostPosted: Mon Jul 03, 2006 1:37 am 
Newbie

Joined: Mon Jul 03, 2006 1:14 am
Posts: 6
Location: Bangalore, India
Hi,

I am trying to implement automatic optimistic concurrency control in my application using version field. I have given the following mapping in my xml file:

<version name="RECORD_VERSION" column="RECORD_VERSION"/>

I am getting the following exception while trying to map the version field in the xml mapping file:

org.hibernate.MappingException: Could not read mappings from resource: india/data/project3/portal/bo/BOAddressInfo.xml
Caused by: org.xml.sax.SAXParseException: Element "class" does not allow "version" here.

Thanks for ur help in advance.

Gopal


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 03, 2006 4:30 am 
Regular
Regular

Joined: Mon Jun 13, 2005 12:21 pm
Posts: 61
Location: Hannover
Please post more information:
1. The Version of Hibernate you're using
2. Cou're compete XML Mapping document (to have a look at the header)
3. You're logfile (is the DTD retrieved from the JAR or checked against the online version)

With this information you'll get more help.


Top
 Profile  
 
 Post subject: Problem solved
PostPosted: Mon Jul 03, 2006 4:47 am 
Newbie

Joined: Mon Jul 03, 2006 1:14 am
Posts: 6
Location: Bangalore, India
I hav corrected a small mistake in my xml mapping file (the version entry should be the first entry after the id mapping). Now the version check update and check is happening perfectly fine.
Thanks for ur response.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 03, 2006 7:58 am 
Regular
Regular

Joined: Mon Jun 13, 2005 12:21 pm
Posts: 61
Location: Hannover
OK, just don't forget the rating ;-)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.