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.
|