using maven (hibernate tools plugin v3.0) -- hibernate tools v 3.2.4, hibernate core 3.3.1
connecting to oracle11g db, default_schema is defined.
Error occurs when I try and include hbm templates. Without the fileset everything works fine.
Caused by: org.hibernate.cfg.JDBCBinderException: Duplicate class name 'Users' generated for 'org.hibernate.mapping.Table(SCHEMA.USERS)'. Same name where generated for 'org.hibernate.mapping.Table(SCHEMA.USERS)'
file structure is
-model
--reveng
---hibernate.cfg.xml
---model.reveng.xml
--generated_models
--src
---main
--target
--pom.xml
I tried using the .hbm files generated from hbm2hbmxml to eliminate some weird .hbm property. No Luck.
Main Goal here is to generate entities that will inherit an Auditable interface.
Let me know what other information would be of use here.
Thanks, for any help!!
CODE WITH ERROR
Code:
<hibernatetool>
<jdbcconfiguration
configurationfile="reveng\hibernate.cfg.xml"
revengfile="reveng\model.reveng.xml"
reversestrategy="blah.blah.CustomReverseEngineeringStrategy"
>
<fileset dir="reveng\hbm_templates">
<include name="**\*.hbm.xml"/>
</fileset>
</jdbcconfiguration>
<hbm2doc destdir="reveng\docs\" />
<hbm2hbmxml destdir="reveng\generated_hbm_templates\" />
<hbm2java destdir="generated_models" jdk5="true" ejb3="true" />
</hibernatetool>
WORKING CODE
Code:
<hibernatetool>
<jdbcconfiguration
configurationfile="reveng\hibernate.cfg.xml"
revengfile="reveng\model.reveng.xml"
reversestrategy="CustomReverseEngineeringStrategy"
>
</jdbcconfiguration>
<hbm2doc destdir="reveng\docs\" />
<hbm2hbmxml destdir="reveng\generated_hbm_templates\" />
<hbm2java destdir="generated_models" jdk5="true" ejb3="true" />
</hibernatetool>