-->
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: XML parsing error
PostPosted: Mon Jan 26, 2004 6:01 pm 
Beginner
Beginner

Joined: Wed Dec 10, 2003 6:58 pm
Posts: 40
Location: Stockholm, Sweden
Error text:

22:29:52,078 ERROR [XMLHelper] Error parsing XML: XML InputStream(46) The content of element type "class" must match "(meta*,(cache|jcs-cache)?,(id|composite-id),discriminator?,(version|timestamp)?,property|many-to-one|one-to-one|component
|dynamic-component|any|map|set|list|bag|idbag|array|primitive-array)*,(subclass*|joined-subclass*))".

22:29:52,078 ERROR [Configuration] Could not compile the mapping document



hbm-file


<hibernate-mapping>

<class name="package.TheClazz"
table="MY_TABLE">

<id name="id"
type="int"
column="ID"
unsaved-value="null">
<generator class="identity"/>
</id>

<property name="updateVersion"
type="long"
column="updateVersion"
not-null="true"
length="20"/>

<property name="name"
type="java.lang.String"
column="name"
not-null="true"
length="50"/>

<property name="homePage"
type="java.lang.String"
column="homePage"
length="100"/>

<version name="updateVersion"
column="updateVersion"
type="int"/>

</class>


When I remove the version part, it works just fine deploying. When I have it there I get the error.

What's wrong? Can't see the error when looking at the DTD.

Best regards

Lasse
</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 26, 2004 6:04 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Try putting version before thr propertys


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 26, 2004 6:09 pm 
Beginner
Beginner

Joined: Wed Dec 10, 2003 6:58 pm
Posts: 40
Location: Stockholm, Sweden
Thanks a lot. You broke the record ... Answering in no-time...

Really amazing ... and I got another error message which led me further on.

Why is the order significant?

Best regards

svaret


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 26, 2004 6:13 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
For most parsers, the elements must be in the order as specified in the DTD for the document to be considered valid. This has bugged me some times too allready until I got it.


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.