java.lang.IllegalAccessError:尝试从类org.slf4j.LoggerFactory访问字段org.slf4j.impl.StaticLoggerBinder.SINGLETON [英] java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
问题描述
我的classpath中有这些jar文件: slf4j-api
& slf4j-log4j12
任何想法可能是什么原因?
这个问题是由于slf4j-log4j12 jar的改变造成的。从版本1.5.6开始,它不允许访问org.slf4j.impl.StaticLoggerBinder.SINGLETON字段。
要解决它,请使用最新的jar(或at对于slf4j-api& amp; amp; slf4j-log4j12。
< dependency>
< groupId> org.slf4j< / groupId>
< artifactId> slf4j-api< / artifactId>
< version> 1.5.6< / version>
< /依赖关系>
< dependency>
< groupId> org.slf4j< / groupId>
< artifactId> slf4j-log4j12< / artifactId>
< version> 1.5.6< / version>
< /依赖关系>
I am facing this error while running my GWT application.
I have these jar files in my classpath: slf4j-api
& slf4j-log4j12
Any idea what could be the reason?
This problem is due to a change in slf4j-log4j12 jar. From version 1.5.6 it doesn't allow to access the field org.slf4j.impl.StaticLoggerBinder.SINGLETON.
To resolve it, use the newest jars (or at least version 1.5.6 onward) for both slf4j-api & slf4j-log4j12.
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.5.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.6</version>
</dependency>
这篇关于java.lang.IllegalAccessError:尝试从类org.slf4j.LoggerFactory访问字段org.slf4j.impl.StaticLoggerBinder.SINGLETON的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!