Reputation: 604
I am using Hibernate 3.5, when I do the reverse engineering with SQL 2012 and Hibernate I am getting following error
org.hibernate.cfg.JDBCBinderException: Duplicate class name com.pepspb.entity.CheckConstraints generated for org.hibernate.mapping.Table(pepspb.sys.check_constraints). Same name where generated for org.hibernate.mapping.Table(pepspb.sys.check_constraints)
Duplicate class name 'com.pepspb.entity.CheckConstraints generated for org.hibernate.mapping.Table(pepspb.sys.check_constraints). Same name where generated for org.hibernate.mapping.Table(pepspb.sys.check_constraints)
<No message>
Can any one please tell me what is the reason?
Upvotes: 3
Views: 4765
Reputation: 7171
In my case, for mysql
there is a sakila
default database, its table name duplicate of other database, filter match-catalog
at reveng.xml
works:
<table-filter match-catalog="nameofdb" match-name=".*" />
Upvotes: 0
Reputation: 1
This sometimes happens when you mix the original sources with the generated ones. To resolve the issue you should separate src
and gensrc
at the module. And don't use gensrc
where you have generated classes via reverse engineering as the source folder. Just compare or even better diff them and merge avoiding duplicate classes.
Upvotes: 2