Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hi,
i try to generate a POJO from the file cow.hbm.xml (shown below). I have installed "HibernateTools-3.2.0.beta6a.zip" and call in eclipse "Run / Hibernate Code Generation...". In the "Exporters" page i have selected "Domain Code (.java)" only. I get the following error-message:
Code:
-----------------------------------------------------------
org.hibernate.MappingException: Could not read mapping document from file: D:\Weres\Java\HibernateTest2\Cow.hbm.xml
org.hibernate.MappingException: class Cow not found while looking for property: id2
org.hibernate.MappingException: class Cow not found while looking for property: id2
java.lang.ClassNotFoundException: Cow
-----------------------------------------------------------
In the Hibernate Console Configuration i have added the cow.hbm.xml. So the file should be known to the tool.
Hibernate version: 3.2 Mapping documents:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="Cow" table="COWS">
<id name="id2" column="EVENT_ID">
<generator class="native"/>
</id>
<property name="date" type="timestamp" column="EVENT_DATE"/>
<property name="title"/>
</class>
</hibernate-mapping>