File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate "Exception in thread "main" java.lang.ExceptionInInitializerError" problem" Watch "Hibernate "Exception in thread "main" java.lang.ExceptionInInitializerError" problem" New topic

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

sivasakam kumarsakam

Joined: Sep 07, 2007
Posts: 21
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 - 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>( at com.vaannila.course.Main.saveCourse( at com.vaannila.course.Main.main( Caused by: java.lang.AbstractMethodError: org.slf4j.impl.SimpleLogger.isTraceEnabled()Z at org.hibernate.type.NullableType.<clinit>( at org.hibernate.Hibernate.<clinit>( at org.hibernate.type.TypeFactory.<clinit>( at org.hibernate.mapping.SimpleValue.getType( at org.hibernate.mapping.SimpleValue.isValid( at org.hibernate.mapping.Property.isValid( at org.hibernate.mapping.PersistentClass.validate( at org.hibernate.mapping.RootClass.validate( at org.hibernate.cfg.Configuration.validate( at org.hibernate.cfg.Configuration.buildSessionFactory( at com.vaannila.util.HibernateUtil.<clinit>( ... 2 more

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

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?


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
sivasakam kumarsakam

Joined: Sep 07, 2007
Posts: 21
thanks sir for your reply... here is total program code...(I am using Eclipse and Hibernate3)




thanks sir.....
ibcomm biswas

Joined: Jul 21, 2013
Posts: 1
I am also facing same error. Mine is a very simple implementation, but cant figure out why getting this error.



And, the main java class

Awaiting helpful responses..
I agree. Here's the link:
subject: Hibernate "Exception in thread "main" java.lang.ExceptionInInitializerError" problem
jQuery in Action, 3rd edition