File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Could not parse mapping document from resource register.hbm.xml
 
Similar Threads
hibernate mapping
does Hibernate support one-to-one bidirectional in subclass?
java.lang.NoClassDefFoundError
Hibernate problem: One-To-Many association
Hibernate Many to Many association does not update database