jQuery in Action, 3rd edition
The moose likes Object Relational Mapping and the fly likes Error in Hibernate Test Prpgram Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Error in Hibernate Test Prpgram" Watch "Error in Hibernate Test Prpgram" New topic

Error in Hibernate Test Prpgram

prathamesh bandivadekar
Ranch Hand

Joined: May 22, 2008
Posts: 43
org.hibernate.InvalidMappingException: Could not parse mapping document from res
ource Employee.hbm.xml


<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"

<class name="com.modeln.hibernate.Employee" table="emp">

<id name="empno" column="empno">
<generator class="assigned"/>

<property name="name">
<column name="ename"/>

<property name="salary">
<column name="sal"/>

<property name="deptno">
<column name="deptno"/>



<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"


<property name="hibernate.connection.driver_class">

<property name="hibernate.connection.url">

<property name="hibernate.connection.username">root</property>

<property name="hibernate.connection.password">root</property>

<property name="dialect">org.hibernate.dialect.MySQLDialect</property>

<property name="show_sql">true</property>

<!--Mapping Resource Description -->
<mapping resource="Employee.hbm.xml"/>


Can anyone suggest the problem with above two XML files?

Prathamesh M.B.<br />Java....only.....
Sundar Pari

Joined: May 04, 2011
Posts: 11
Please post your project structure and stacktrace
subject: Error in Hibernate Test Prpgram
It's not a secret anymore!