Friday, March 5, 2010

Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

PROBLEM:
If working with Hibernte, you got this message:
Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory 

SOLUTION: 
solve the problem adding this two jar files to the project's library:
   slf4j-api-1.5.10.jar
   slf4j-simple-1.5.0.jar


You find those jars on  http://www.slf4j.org/manual.html 

Go to the download page and download the file "slf4j-X.Y.Z.zip" (or the tar file).
Be sure that the version matches you project's environment.

How?
Simple: check the project jars' versions, compare and try! : )
 

 

eclipse: java: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" or Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

  >PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...