• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HIbernate Example not working

 
saleti aleti
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I would be thankful if anybody can help me out of this error
when i run

ant run -Daction=store
i get the following error

run:
[java] Initial SessionFactory creation failed.java.lang.NoClassDefFoundErro
r: org/slf4j/LoggerFactory
[java] Exception in thread "main" java.lang.ExceptionInInitializerError
[java] at utils.HibernateUtil.<clinit>(Unknown Source)
[java] at events.EventManager.createAndStoreEvent(Unknown Source)
[java] at events.EventManager.main(Unknown Source)
[java] Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
[java] at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:1
51)
[java] ... 3 more
[java] Java Result: 1

BUILD SUCCESSFUL
Total time: 1 second


i have added all the necessary jars including
ant-antlr-1.6.5.jar
asm.jar
asm-attrs.jar
cgilib-2.1.3.jar
commons-collections-2.1.1.jar
commons-logging-1.0.4.jar
dom4j-1.6.1.jar
jta.jar
log4j-1.2.11.jar
and slf4j-1.5.0.jar also

Thanks,
Silpa
 
peter tong
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add slf4j-api-1.5.3.jar
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic