-->
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: Hibernate error the content of element type class must match
PostPosted: Tue Oct 17, 2017 5:43 pm 
Newbie

Joined: Tue Oct 17, 2017 5:36 pm
Posts: 2
I have a hbm.xml file but it's giving me this error:

Quote:
The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array),((join,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,fetch-profile*,resultset*,(query|sql-query)*)".
and this is the xml code:


Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<!-- Generated 28-nov-2011 11:25:43 by Hibernate Tools 3.4.0.CR1 -->
<hibernate-mapping>
<class name="rrosga.dae.entities.Register" schema="dae" table="registers">
  <id name="idregister" type="java.lang.Integer">
   <column name="idregister"/>
   <generator class="identity"/>
  </id> 
  <property name="date_start" type="java.util.Date">
   <column name="date_start"/>
  </property>
  <property name="date_end" type="java.util.Date">
   <column name="date_end"/>
  </property>               
  <property name="city" type="java.lang.Short">
   <column name="city"/>
  </property>
  <property name="employee" type="java.lang.Integer">
   <column name="employee"/>   
  </property>

</class>
</hibernate-mapping>


I've read in other posts that I need to set an id tag but i think i have it right, am i missing something ?


Top
 Profile  
 
 Post subject: Re: Hibernate error the content of element type class must match
PostPosted: Wed Oct 18, 2017 1:18 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1630
Location: Romania
This class looks ok, maybe it's a different mapping that throws this error.


Top
 Profile  
 
 Post subject: Re: Hibernate error the content of element type class must match
PostPosted: Wed Oct 18, 2017 10:32 am 
Newbie

Joined: Tue Oct 17, 2017 5:36 pm
Posts: 2
vlad wrote:
This class looks ok, maybe it's a different mapping that throws this error.


Yea it was something else, I was uploading changes to a wrong path -_- thanks anyway


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.