tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org

tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory

在更换机器后,启动原有项目出现上述问题,网上的描述和解决方法是:
类 org.slf4j.impl.StaticLoggerBinder在slf4j-api 中是类的公有静态变量:
public static final StaticLoggerBinder SINGLETON = new StaticLoggerBinder();
而在slf4j-log4j12(slf4j-nop.jar, slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar其中之一)中确是私有变量:
private static final StaticLoggerBinder SINGLETON = new StaticLoggerBinder();

解决办法:由于我用的是hibernate3.3及annotation3.4,里面有有2个slf4j-api.jar,保留那个有版本数字的jar包,并且添加相应的实现jar即可解决。

你可能感兴趣的:(Access)