wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Could not parse mapping document from resource register.hbm.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Could not parse mapping document from resource register.hbm.xml" Watch "Could not parse mapping document from resource register.hbm.xml" New topic
Author

Could not parse mapping document from resource register.hbm.xml

venkataswamy sonti
Greenhorn

Joined: Apr 14, 2012
Posts: 7
Hi I am not able to find the why that exception occurs.

My register.hbm.xml as follows

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="RegisterPojo" table="REGISTRATION">
<id name="registerId" column="registerid">
<generator class="sequence"/>
</id>
<property name="name" column="name" not-null="true"/>
<property name="address" column="address" not-null="true"/>
<property name="phone" column="phone" not-null="true"/>
<property name="email" column="email" not-null="true"/>
<property name="userName" column="userName" not-null="true"/>
<property name="password" column="password" not-null="true"/>
<property name="cpassword" column="cpassword" not-null="true"/>
</class>
</hibernate-mapping>



Could you please help me on this. Thank you in advance.
Anurag Verma
Ranch Hand

Joined: Mar 30, 2012
Posts: 124

Is your RegisterPojo class inside some package? If no, then recommendation is put it inside some package & update your hbm file as per that. If you already have it, then you missed to mention the package name in your hbm file.
venkataswamy sonti
Greenhorn

Joined: Apr 14, 2012
Posts: 7
Thank you.. yes, i forgot the mentioned the package name infront of the form name in xml file. now its working..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Could not parse mapping document from resource register.hbm.xml