12
votes

I am getting the following messages in console when I try to run the Hibernate .

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

but the hibernate works fine . is there any problem in my project ? i use Eclipse(Helios),Hibernate 3.6.8 . i use these jar files : antlr-2.7.6 , commons-collections-3.1 , dom4j-1.6.1 , hibernate3 , hibernate-jpa-2.0-api-1.0.1.Final , javassist-3.12.0.GA , jta-1.1 , slf4j-api-1.6.1

2

2 Answers

15
votes

This error indicates that appropriate SLF4J binding could not be found on the class path. Placing one (and only one) of slf4j-nop.jar, slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem.

See http://www.slf4j.org/index.html

0
votes

Had error with the same result with Gradle and was able to solve it by the script below. May this be related to https://issues.gradle.org/browse/GRADLE-897?

//compile 'org.slf4j:slf4j-api:1.7.1'
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.1'
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.1'
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.1'

Outcommented line in the one which caused the error output.