Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LoggerFactory not found

 
Mohamad Ibrahim
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm new at hibernate , when i tried to run my first simple application an exception is thrown
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:152)
at cms.ExampleRun.main(ExampleRun.java:16)
i tried to fix it by downloading one of the slf4j packages and the problem still alive.
Thanks
 
Benjamin Winterberg
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate switched from Apache Commons Logging to SLF4J in some version. You have to put SLF4J API + one of the implementions to your Classpath.
E.g. if you want to use Log4J you have to put those jars to your classpath:

- slf4j-api
- slf4j-log4j12
- log4j-1.2.x


Better: Use Maven2 to manage your dependancies.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic