• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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......
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.....
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic