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
|