You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one sets file.encoding to an unsupported encoding string (for example ISO-8859 missing the last qualifier ISO-8859-1) logback fails to start with an unhelpful java.lang.NullPointerException.
The encoding exception is swallowed in the deprecated URLDecoder.decode(String) used below in logback-core.
There is a fix in openjdk 22+18 that would resolve this however, but it's a bit nasty untill one can update. So for all java (8, 22+17] there is this NPE.
Failed to instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
java.lang.NullPointerException
at java.base/java.io.File.<init>(File.java:278)
at ch.qos.logback.core.joran.spi.ConfigurationWatchList.convertToFile(ConfigurationWatchList.java:95)
at ch.qos.logback.core.joran.spi.ConfigurationWatchList.addAsFileToWatch(ConfigurationWatchList.java:59)
at ch.qos.logback.core.joran.spi.ConfigurationWatchList.setMainURL(ConfigurationWatchList.java:55)
at ch.qos.logback.core.joran.util.ConfigurationWatchListUtil.setMainWatchURL(ConfigurationWatchListUtil.java:50)
at ch.qos.logback.core.joran.GenericConfigurator.informContextOfURLUsedForConfiguration(GenericConfigurator.java:100)
at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:46)
at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
at ch.qos.logback.classic.util.StatusViaSLF4JLoggerFactory.addStatus(StatusViaSLF4JLoggerFactory.java:32)
at ch.qos.logback.classic.util.StatusViaSLF4JLoggerFactory.addInfo(StatusViaSLF4JLoggerFactory.java:20)
at ch.qos.logback.classic.servlet.LogbackServletContainerInitializer.onStartup(LogbackServletContainerInitializer.java:32)
The text was updated successfully, but these errors were encountered:
If one sets
file.encoding
to an unsupported encoding string (for exampleISO-8859
missing the last qualifierISO-8859-1
) logback fails to start with an unhelpfuljava.lang.NullPointerException
.The encoding exception is swallowed in the deprecated
URLDecoder.decode(String)
used below in logback-core.https://github.com/qos-ch/logback/blob/9078f68f49673d2163ebbaa075ec4018a6d12e54/logback-core/src/main/java/ch/qos/logback/core/joran/spi/ConfigurationWatchList.java#L97C40-L97C46
There is a fix in
openjdk 22+18
that would resolve this however, but it's a bit nasty untill one can update. So for all java (8, 22+17] there is this NPE.https://bugs.openjdk.org/browse/JDK-8317246
The text was updated successfully, but these errors were encountered: