This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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

 
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......
 
ranger
Sheriff
Posts: 17314
11
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.....
 
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..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!