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)
_______________________________________________
slf4j-dev mailing list
slf4j-dev@qos.ch
http://mailman.qos.ch/mailman/listinfo/slf4j-dev

Reply via email to