[logback-dev] SLF4J+logback not working with JDK9 (Jigsaw) early access

Chris Newland cnewland at chrisnewland.com
Tue Oct 27 13:02:33 UTC 2015


This was a bug in JDK9 which is now fixed.

Apologies for the noise.

On Mon, October 19, 2015 14:42, Chris Newland wrote:
> Hi,
>
>
> Just an FYI.
>
>
> I've been doing early-access testing of JDK9b83 (project Jigsaw modular
> build from https://jdk9.java.net/jigsaw/)
>
> The first call to LoggerFactory.getLogger(Class clazz) fails with the
> exception:
>
>
> Failed to instantiate [ch.qos.logback.classic.LoggerContext]
> Reported exception:
> java.lang.InternalError: unnamed package in named module java.base
> at
> jdk.internal.misc.BuiltinClassLoader.definePackage(java.base at 9.0/BuiltinC
> lassLoader.java:569)
> at
> jdk.internal.misc.BootLoader.definePackage(java.base at 9.0/BootLoader.java:
> 123)
> at java.lang.Class.getPackage(java.base at 9.0/Class.java:917) at
> ch.qos.logback.core.joran.util.StringToObjectConverter.canBeBuiltFromSimp
> leString(StringToObjectConverter.java:34)
> at
> ch.qos.logback.core.joran.util.PropertySetter.computeRawAggregationType(P
> ropertySetter.java:233)
> at
> ch.qos.logback.core.joran.util.PropertySetter.computeAggregationType(Prop
> ertySetter.java:194)
> at
> ch.qos.logback.core.joran.action.NestedComplexPropertyIA.isApplicable(Nes
> tedComplexPropertyIA.java:61)
> at
> ch.qos.logback.core.joran.spi.Interpreter.lookupImplicitAction(Interprete
> r.java:237)
> at
> ch.qos.logback.core.joran.spi.Interpreter.getApplicableActionList(Interpr
> eter.java:256)
> at
> ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:1
> 44)
> at
> ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:1
> 29)
> at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50) at
> ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigur
> ator.java:149)
> at
> ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigur
> ator.java:135)
> at
> ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigur
> ator.java:99)
> at
> ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigur
> ator.java:49)
> at
> ch.qos.logback.classic.util.ContextInitializer.configureByResource(Contex
> tInitializer.java:77)
> at
> ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitiali
> zer.java:152)
> at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at
> org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
> at org.slf4j.LoggerFactory.bind(LoggerFactory.java:141) at
> org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:120)
> at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:331) at
> org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:283)
> at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:304) at
> org.adoptopenjdk.jitwatch.ui.JITWatchUI.<clinit>(JITWatchUI.java:86)
> at org.adoptopenjdk.jitwatch.launch.LaunchUI.main(LaunchUI.java:18) at
> sun.reflect.NativeMethodAccessorImpl.invoke0(java.base at 9.0/Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(java.base at 9.0/NativeMethodAcc
> essorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base at 9.0/DelegatingM
> ethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(java.base at 9.0/Method.java:530) at
> org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
> at java.lang.Thread.run(java.base at 9.0/Thread.java:746)
>
> The program continues but there is no log output.
>
>
> This is with
>
>
> slf4j-api-1.7.7.jar logback-classic-1.1.2.jar logback-core-1.1.2.jar
>
> If I remove the logback jars and replace with slf4j-jdk14-1.7.12.jar then
>  it works fine.
>
> Cheers,
>
>
> Chris
>
>
>
> _______________________________________________
> logback-dev mailing list logback-dev at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-dev




More information about the logback-dev mailing list