[logback-dev] [JIRA] (LOGBACK-1381) module ch.qos.logback.core does not read module java.xml

QOS.CH (JIRA) noreply-jira at qos.ch
Sun Feb 11 12:27:00 CET 2018


Mark Raynsford created LOGBACK-1381:
---------------------------------------

             Summary: module ch.qos.logback.core does not read module java.xml
                 Key: LOGBACK-1381
                 URL: https://jira.qos.ch/browse/LOGBACK-1381
             Project: logback
          Issue Type: Bug
         Environment: $ java -version
openjdk version "9"
OpenJDK Runtime Environment (build 9+181)
OpenJDK 64-Bit Server VM (build 9+181, mixed mode)

$ uname -a
Linux copperhead 4.14.15-1-ARCH #1 SMP PREEMPT Tue Jan 23 21:49:25 UTC 2018 x86_64 GNU/Linux

            Reporter: Mark Raynsford
            Assignee: Logback dev list


It seems that the module descriptor for logback-core is missing a "requires" clause for java.xml:

{noformat}
Exception in thread "main" java.lang.IllegalAccessError: class ch.qos.logback.core.joran.GenericConfigurator (in module ch.qos.logback.core) cannot access class org.xml.sax.InputSource (in module java.xml) because module ch.qos.logback.core does not read module java.xml
        at ch.qos.logback.core/ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:108)
        at ch.qos.logback.core/ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
        at ch.qos.logback.classic/ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:82)
        at ch.qos.logback.classic/ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:157)
        at ch.qos.logback.classic/ch.qos.logback.classic.spi.LogbackServiceProvider.initializeLoggerContext(LogbackServiceProvider.java:49)
        at ch.qos.logback.classic/ch.qos.logback.classic.spi.LogbackServiceProvider.initialize(LogbackServiceProvider.java:40)
        at org.slf4j/org.slf4j.LoggerFactory.bind(LoggerFactory.java:153)
        at org.slf4j/org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:141)
        at org.slf4j/org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:419)
        at org.slf4j/org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:405)
        at org.slf4j/org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:354)
        at org.slf4j/org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:380)
        at com.io7m.bugs.logback/com.io7m.bugs.logback.Main.<clinit>(Main.java:8)

{noformat}

There's a trivial repro case at https://github.com/io7m/logback-bug-20180211.

Just "mvn clean package && ./run.sh"



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


More information about the logback-dev mailing list