-->
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.  [ 1 post ] 
Author Message
 Post subject: Error parsing mapping file with hibernate 3
PostPosted: Thu Jun 30, 2005 12:55 am 
Beginner
Beginner

Joined: Thu Jun 09, 2005 3:18 am
Posts: 34
Location: India
Hi all

I am using Hibernate 3.0 version

here is my mapping file

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">



<hibernate-mapping>
<class name="Dept" table="Administrator.DEPT">
<id name="dept_id" column="dept_id" type="long" >
<generator class="assigned"/>
</id>
<property name="dname" column="DNAME" type="string"/>
<property name="location" column="LOCATION" type="string"/>


<set name="emp" table="Administrator.EMPP" inverse="true" lazy="true" cascade="all">
<key column="dept_id"/>
<one-to-many class="Emp"/>
</set>

</class>

</hibernate-mapping>



My log information is

10:23:30,736 INFO Configuration:440 - Mapping resource: Dept.hbm.xml
10:23:30,827 ERROR XMLHelper:59 - Error parsing XML: XML InputStream(8) Document root element "hibernate-mapping", must match DOCTYPE root "hibernate-configuration".
10:23:30,837 ERROR XMLHelper:59 - Error parsing XML: XML InputStream(8) Element type "hibernate-mapping" must be declared.
10:23:30,847 ERROR XMLHelper:59 - Error parsing XML: XML InputStream(9) Element type "class" must be declared.
10:23:30,857 ERROR XMLHelper:59 - Error parsing XML: XML InputStream(10) Element type "id" must be declared.
10:23:30,857 ERROR XMLHelper:59 - Error parsing XML: XML InputStream(11) Element type "generator" must be declared.
10:23:30,887 ERROR XMLHelper:59 - Error parsing XML: XML InputStream(13) Attribute "column" must be declared for element type "property".
10:23:30,897 ERROR XMLHelper:59 - Error parsing XML: XML InputStream(13) Attribute "type" must be declared for element type "property".
10:23:30,897 ERROR XMLHelper:59 - Error parsing XML: XML InputStream(14) Attribute "column" must be declared for element type "property".
10:23:30,907 ERROR XMLHelper:59 - Error parsing XML: XML InputStream(14) Attribute "type" must be declared for element type "property".
10:23:30,927 ERROR XMLHelper:59 - Error parsing XML: XML InputStream(17) Element type "set" must be declared.
10:23:30,937 ERROR XMLHelper:59 - Error parsing XML: XML InputStream(18) Element type "key" must be declared.
10:23:30,937 ERROR XMLHelper:59 - Error parsing XML: XML InputStream(19) Element type "one-to-many" must be declared.
Initial SessionFactory creation failed.org.hibernate.MappingException: Error reading resource: Dept.hbm.xml

Kindly help me


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

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.