-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Duplicate Class Name 'Users' generated Error
PostPosted: Thu Mar 07, 2013 3:06 am 
Newbie

Joined: Thu Mar 07, 2013 2:48 am
Posts: 1
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>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.