-->
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: Fri Jan 28, 2011 8:10 am 
Newbie

Joined: Thu Jan 27, 2011 6:39 am
Posts: 1
Hello ,
i'm using hibernate annotation and my database contain around 800 tables , i have created annotation for all table's using Hibernate reverse engineering .

now i'm trying to fetch data from any table . but i'm getting following error in each case .

%%%% Error Creating SessionFactory %%%%

org.hibernate.AnnotationException: Mixing nullable and non nullable columns in a property is not allowed: org.hibernate.annotation.FixedAssetMeterfixedAssetMaint
at org.hibernate.cfg.Ejb3Column.checkPropertyConsistency(Ejb3Column.java:414)
at org.hibernate.cfg.AnnotationBinder.bindManyToOne(AnnotationBinder.java:1875)
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1311)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:733)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:498)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:277)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
at org.hibernate.cfg.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:32)
at org.hibernate.cfg.First.main(First.java:23)
%%%% Error Creating SessionFactory %%%%

org.hibernate.DuplicateMappingException: Duplicate class/entity mapping org.hibernate.annotation.BudgetRole
at org.hibernate.cfg.Mappings.addClass(Mappings.java:118)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:769)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:498)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:277)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
at org.hibernate.cfg.HibernateSessionFactory.rebuildSessionFactory(HibernateSessionFactory.java:71)
at org.hibernate.cfg.HibernateSessionFactory.getSession(HibernateSessionFactory.java:54)
at org.hibernate.cfg.First.main(First.java:23)
Exception in thread "main" java.lang.NullPointerException
at org.hibernate.cfg.First.main(First.java:44)


may some one help me to resolve this error.
Thanks in advance.


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.