-->
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 Mapping Exception
PostPosted: Tue Feb 17, 2015 7:20 pm 
Newbie

Joined: Tue Feb 17, 2015 7:14 pm
Posts: 1
Hello, I've used hibernate tools to reverse engineer an oracle 10g database. It has generated java classes for every tables as expected, but when i try launch my program, i get a Duplicate Mapping Exception. There is a single, generated, hbm.xml file for each classes and there are no annotations. What could the problem be?


Quote:
févr. 17, 2015 6:00:17 PM org.hibernate.cfg.Configuration$MappingsImpl addImport
INFO: HHH000071: Duplicate import: Genre -> Genre
Exception in thread "main" java.lang.ExceptionInInitializerError
at HibernateUtil.<clinit>(HibernateUtil.java:19)
at Main.main(Main.java:12)
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from resource Genre.hbm.xml
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:3819)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXmlQueue(Configuration.java:3808)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3796)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1412)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1846)
at HibernateUtil.<clinit>(HibernateUtil.java:17)
... 1 more
Caused by: org.hibernate.DuplicateMappingException: Duplicate collection role mapping Genre.films
at org.hibernate.cfg.Configuration$MappingsImpl.addCollection(Configuration.java:2908)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2249)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2224)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:412)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:327)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:178)
at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:3816)
... 6 more


Thanks

-Philippe


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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.