Hi team,
Currently, my project is using xdoclet (2.0.1) and hibernate (4.3.10) to generate *.hbm.xml, and export SQL. I have tried to upgrade these libraries to the latest version, especially for Hibernate to version 5.6.
There are two ant targets, including java2hbm and build.db.schema. The hbm files are generated successfully and placed in the mapping directory, then the next ant target build.db.schema will export to ddl. I can generate hbm files with the new version of Hibernate, but then it is failed to export schema with the error:
Error performing export: Could not parse mapping document: D:…\model\AclTemplate.hbm.xml (FILE)
Ant task for generating hbm and SQL files:
AclTemplate.hbm.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class dynamic-update="true" table="acl_template" dynamic-insert="true" name="com.example.model.AclTemplate">
<id unsaved-value="0" name="id" column="acl_template_id">
<generator class="com.example.hibernate.StoredProcIdGenerator">
<param name="OWNER_TYPE_DESCR">ACL_TEMPLATE</param>
</generator>
</id>
<version unsaved-value="undefined" name="version" column="version" type="long"/>
<property name="name">
<column name="name" length="255" not-null="true"/>
</property>
<many-to-one cascade="none" foreign-key="FK_ACL_TEMPLATE_ORGANIZATION" class="com.example.model.Organization" name="organization">
<column name="org_id" not-null="true"/>
</many-to-one>
<property name="internalView">
<column name="internal_view" not-null="true"/>
</property>
<component name="lastUpdate" class="com.example.model.LastUpdate">
<property name="user">
<column name="last_upd_usr"/>
</property>
<property name="date">
<column name="last_upd_dt" sql-type="datetime"/>
</property>
</component>
<set inverse="true" cascade="none" order-by="sort_order" lazy="true" table="acl_template_element" name="aclTemplateElements">
<key column="acl_template_id"/>
<one-to-many class="com.example.model.AclTemplateElement"/>
</set>
</class>
</hibernate-mapping>
Thanks
Phong Huynh