java怎么拦截某个对象
480
2022-09-07
SLF4J: Failed to load class的问题及解决
今天在用Maven搞一个工程,安装要求我添加了所有需要的依赖,可是一运行测试程序,就跳出这样一个大大的错误:
SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. SLF4J: See for further details. Exception in thread “main” java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder ……
所以,我们在我们的工程中添加1.5.11版本的slf4j-log4j12和1.2.14版本的log4j,问题完美解决。
我发现这篇文章比我讲的清楚,请参考:Failed to load class “org.slf4j.impl.StaticLoggerBinder问题故障的解决
This error is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory. This happens when no appropriate SLF4J binding could 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换成高版本试试!
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~