*
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 Android Security Essentials Live Lessons this week in the Android 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
Author

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

sivasakam kumarsakam
Greenhorn

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

Joined: Feb 05, 2001
Posts: 17249
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
sivasakam kumarsakam
Greenhorn

Joined: Sep 07, 2007
Posts: 21
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.....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate "Exception in thread "main" java.lang.ExceptionInInitializerError" problem....
 
Similar Threads
exception getting while running a Hibernate program
Error:java.lang.NoClassDefFoundError: javax/persistence/EntityList
Hibernate: ClassDefNotFoundError
What is the connection string for Driver and url used for hibernate in Oracle 9
Initial SessionFactory creation failed. java.lang.AbstractMethodErro