Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate "Exception in thread "main" java.lang.ExceptionInInitializerError" problem

 
sivasakam kumarsakam
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i am trying to run Hibernate program. it gave following error...

236 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.2.GA 261 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found 341 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist 394 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling 715 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml 715 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml 1140 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : com/vaannila/course/Course.hbm.xml 1341 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.vaannila.course.Course -> COURSES 1386 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null Initial SessionFactory creation failed. java.lang.AbstractMethodError: org.slf4j.impl.SimpleLogger.isTraceEnabled()Z Exception in thread "main" java.lang.ExceptionInInitializerError at com.vaannila.util.HibernateUtil.<clinit>(HibernateUtil.java:13) at com.vaannila.course.Main.saveCourse(Main.java:25) at com.vaannila.course.Main.main(Main.java:15) Caused by: java.lang.AbstractMethodError: org.slf4j.impl.SimpleLogger.isTraceEnabled()Z at org.hibernate.type.NullableType.<clinit>(NullableType.java:59) at org.hibernate.Hibernate.<clinit>(Hibernate.java:103) at org.hibernate.type.TypeFactory.<clinit>(TypeFactory.java:69) at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:283) at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:276) at org.hibernate.mapping.Property.isValid(Property.java:207) at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:458) at org.hibernate.mapping.RootClass.validate(RootClass.java:215) at org.hibernate.cfg.Configuration.validate(Configuration.java:1149) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1334) at com.vaannila.util.HibernateUtil.<clinit>(HibernateUtil.java:10) ... 2 more

thanks......
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Code tag above will make the stack trace more readable. Right now I can't read it as it is posted.

Also, please change the subject title to be more specific. Every post here is really a Hibernate Problem or JPA.

Anyway. something looks wrong in your com/vaannila/course/Course.hbm.xml file or Course class about saveCourse?

I think you will need to post your Course class and its mapping file and what you have in your Main method and HibernateUtil class

What version of Hibernate are you using?

Mark
 
sivasakam kumarsakam
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks sir for your reply... here is total program code...(I am using Eclipse and Hibernate3)

hibernate.cfg.xml



Course.hbm.xml



Course.java



Main.java



HibernateUtil.java



error


thanks sir.....
 
ibcomm biswas
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also facing same error. Mine is a very simple implementation, but cant figure out why getting this error.

hibernate.cfg.xml

Travel_details.hbm.xml

And, the main java class

Awaiting helpful responses..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic