Java.lang.IllegalAccessError: tried to access the org.slf4j.impl.StaticLoggerBinder.SINGLETON field from the org.slf4j.LoggerFactory class

I am facing this error when starting my GWT application.

I have these jar files in my classpath: slf4j-api and slf4j-log4j12

Any idea what could be the reason?

+4
source share
1 answer

This problem occurs due to a change in the slf4j-log4j12 jar. From version 1.5.6, it does not allow access to the org.slf4j.impl.StaticLoggerBinder.SINGLETON field.

To solve this problem, use the latest banks (or at least version 1.5.6) for both slf4j-api and 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> 
+17
source

Source: https://habr.com/ru/post/1393315/


All Articles