[slf4j-dev] [JIRA] (SLF4J-438) IllegalAccessError in MDC when using Java 10

QOS.CH (JIRA) noreply-jira at qos.ch
Wed Jun 27 10:37:00 CEST 2018


Andreas Bergander created SLF4J-438:
---------------------------------------

             Summary: IllegalAccessError in MDC when using Java 10
                 Key: SLF4J-438
                 URL: https://jira.qos.ch/browse/SLF4J-438
             Project: SLF4J
          Issue Type: Bug
    Affects Versions: 1.7.25
         Environment: Java 10

slf4j-api-1.7.25

slf4j-log4j12-1.7.25
            Reporter: Andreas Bergander
            Assignee: SLF4J developers list


When using MDC and log4j I get an IllegalAccessError during initialization.
{noformat}
java.lang.IllegalAccessError: tried to access field org.apache.log4j.MDC.mdc from class org.apache.log4j.MDCFriend
        at org.apache.log4j.MDCFriend.fixForJava9(MDCFriend.java:11)
        at org.slf4j.impl.Log4jMDCAdapter.<clinit>(Log4jMDCAdapter.java:38)
        at org.slf4j.impl.StaticMDCBinder.getMDCA(StaticMDCBinder.java:59)
        at org.slf4j.MDC.bwCompatibleGetMDCAdapterFromBinder(MDC.java:99)
        at org.slf4j.MDC.<clinit>(MDC.java:108)
{noformat}
 I guess package private fields are not accessible between different jar-files anymore in Java 10. Or am I doing something wrong?

 



--
This message was sent by Atlassian JIRA
(v7.3.1#73012)


More information about the slf4j-dev mailing list