I'm trying to use the Hibernate ANT tasks to generate the model java compoents from my HBM files, per this link
http://www.hibernate.org/hib_docs/refer ... tional-121 and its not working.
Hibernate version: 3.2.6 ga
Mapping documents:
User.hbm.xml
<hibernate-mapping>
<class name="com.model.User" table="USERS">
<id name="id" type="int" column="USER_ID">
<meta attribute="scope-set">protected</meta>
<generator class="native"/>
</id>
</class>
</hibernate-mapping>
UserDetail.hbm.xml
<hibernate-mapping>
<class name="com.model.UserDetail" table="USER_DETAILS">
<id name="userDetailsId" type="int" column="USER_ID">
<generator class="foreign">
<param name="property">user</param>
</generator>
</id>
<one-to-one name="User" constrained="true"/>
</class>
</hibernate-mapping>
Full stack trace of any exception that occurs:
[hibernatetool] Executing Hibernate Tool with a Standard Configuration
[hibernatetool] 1. task: hbm2java (Generates a set of .java files)
[hibernatetool] An exception occurred while running exporter #2:hbm2java (Generates a set of .java files)
[hibernatetool] To get the full stack trace run ant with -verbose
[hibernatetool] org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/model/UserDetails.hbm.xml
[hibernatetool] org.hibernate.MappingException: class com.model.UserDetail not found while looking for property: User
[hibernatetool] java.lang.ClassNotFoundException: com.model.UserDetail
[hibernatetool] A class were not found in the classpath of the Ant task.
[hibernatetool] Ensure that the classpath contains the classes needed for Hibernate and your code are in the classpath.
BUILD FAILED
C:\workspace_jee\MyApp\build.xml:118: org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/adobe/UserDetails.hbm.xml
Name and version of the database you are using:
HSQL