I am getting the following messages in console when I try to run the Hibernate .
当我尝试运行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
但是冬眠工作正常。我的项目有什么问题吗?我使用Eclipse(Helios),Hibernate 3.6.8。我使用这些jar文件: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 个解决方案
#1
15
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.
此错误表示在类路径上找不到适当的SLF4J绑定。在类路径上放置一个(并且只有一个)slf4j-nop.jar,slf4j-simple.jar,slf4j-log4j12.jar,slf4j-jdk14.jar或logback-classic.jar应该可以解决问题。
See http://www.slf4j.org/index.html
见http://www.slf4j.org/index.html
#2
0
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?
与Gradle有相同结果的错误,并且能够通过下面的脚本解决它。这可能与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.
导致错误输出的一行中的Outcommented行。
#1
15
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.
此错误表示在类路径上找不到适当的SLF4J绑定。在类路径上放置一个(并且只有一个)slf4j-nop.jar,slf4j-simple.jar,slf4j-log4j12.jar,slf4j-jdk14.jar或logback-classic.jar应该可以解决问题。
See http://www.slf4j.org/index.html
见http://www.slf4j.org/index.html
#2
0
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?
与Gradle有相同结果的错误,并且能够通过下面的脚本解决它。这可能与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.
导致错误输出的一行中的Outcommented行。