[slf4j-dev] [JIRA] Updates for SLF4J-534: Improve error handling for situations where paths is null in findPossibleStaticLoggerBinderPathSet()

QOS.CH (JIRA) noreply-jira at qos.ch
Wed Jan 12 09:52:00 CET 2022


SLF4J / SLF4J-534 [Open]
Improve error handling for situations where paths is null in findPossibleStaticLoggerBinderPathSet()

==============================

Here's what changed in this issue in the last few minutes.
This issue has been created
This issue is now assigned to you.

View or comment on issue using this link
https://jira.qos.ch/browse/SLF4J-534

==============================
 Issue created
------------------------------

Oliver Lietz created this issue on 12/Jan/22 9:37 AM
Summary:              Improve error handling for situations where paths is null in findPossibleStaticLoggerBinderPathSet()
Issue Type:           Improvement
Affects Versions:     1.7.32
Assignee:             SLF4J developers list
Components:           Core API
Created:              12/Jan/22 9:37 AM
Environment:
  NPE in JPMS/OSGi application:
  
  {noformat}
  Failed to instantiate SLF4J LoggerFactory
  Reported exception:
  java.lang.NullPointerException: Cannot invoke "java.util.Enumeration.hasMoreElements()" because "paths" is null
  	at ModuleConnectLoader-org.ops4j.pax.logging.pax-logging-api/org.ops4j.pax.logging.pax-logging-api at 2.0.15.SNAPSHOT/org.slf4j.LoggerFactory.findPossibleStaticLoggerBinderPathSet(LoggerFactory.java:310)
  	at ModuleConnectLoader-org.ops4j.pax.logging.pax-logging-api/org.ops4j.pax.logging.pax-logging-api at 2.0.15.SNAPSHOT/org.slf4j.LoggerFactory.bind(LoggerFactory.java:146)
  	at ModuleConnectLoader-org.ops4j.pax.logging.pax-logging-api/org.ops4j.pax.logging.pax-logging-api at 2.0.15.SNAPSHOT/org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
  	at ModuleConnectLoader-org.ops4j.pax.logging.pax-logging-api/org.ops4j.pax.logging.pax-logging-api at 2.0.15.SNAPSHOT/org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
  	at ModuleConnectLoader-org.ops4j.pax.logging.pax-logging-api/org.ops4j.pax.logging.pax-logging-api at 2.0.15.SNAPSHOT/org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
  	at ModuleConnectLoader-org.ops4j.pax.logging.pax-logging-api/org.ops4j.pax.logging.pax-logging-api at 2.0.15.SNAPSHOT/org.ops4j.pax.logging.internal.Activator.start(Activator.java:112)
  	at org.apache.felix.framework at 7.0.3/org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:849)
  	at org.apache.felix.framework at 7.0.3/org.apache.felix.framework.Felix.activateBundle(Felix.java:2429)
  	at org.apache.felix.framework at 7.0.3/org.apache.felix.framework.Felix.startBundle(Felix.java:2335)
  	at org.apache.felix.framework at 7.0.3/org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1566)
  	at org.apache.felix.framework at 7.0.3/org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
  	at java.base/java.lang.Thread.run(Thread.java:833)
  ERROR: Bundle org.ops4j.pax.logging.pax-logging-api [33] Error starting atomos:application:file:///[...]/de.bildschirmarbeiter.aem.toolbox.package/target/jlink/mp/pax-logging-api-2.0.15-SNAPSHOT.jar (org.osgi.framework.BundleException: Activator start error in bundle org.ops4j.pax.logging.pax-logging-api [33].)
  java.lang.IllegalStateException: Unexpected initialization failure
  	at ModuleConnectLoader-org.ops4j.pax.logging.pax-logging-api/org.ops4j.pax.logging.pax-logging-api at 2.0.15.SNAPSHOT/org.slf4j.LoggerFactory.bind(LoggerFactory.java:175)
  	at ModuleConnectLoader-org.ops4j.pax.logging.pax-logging-api/org.ops4j.pax.logging.pax-logging-api at 2.0.15.SNAPSHOT/org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
  	at ModuleConnectLoader-org.ops4j.pax.logging.pax-logging-api/org.ops4j.pax.logging.pax-logging-api at 2.0.15.SNAPSHOT/org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
  	at ModuleConnectLoader-org.ops4j.pax.logging.pax-logging-api/org.ops4j.pax.logging.pax-logging-api at 2.0.15.SNAPSHOT/org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
  	at ModuleConnectLoader-org.ops4j.pax.logging.pax-logging-api/org.ops4j.pax.logging.pax-logging-api at 2.0.15.SNAPSHOT/org.ops4j.pax.logging.internal.Activator.start(Activator.java:112)
  	at org.apache.felix.framework at 7.0.3/org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:849)
  	at org.apache.felix.framework at 7.0.3/org.apache.felix.framework.Felix.activateBundle(Felix.java:2429)
  	at org.apache.felix.framework at 7.0.3/org.apache.felix.framework.Felix.startBundle(Felix.java:2335)
  	at org.apache.felix.framework at 7.0.3/org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1566)
  	at org.apache.felix.framework at 7.0.3/org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
  	at java.base/java.lang.Thread.run(Thread.java:833)
  Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Enumeration.hasMoreElements()" because "paths" is null
  	at ModuleConnectLoader-org.ops4j.pax.logging.pax-logging-api/org.ops4j.pax.logging.pax-logging-api at 2.0.15.SNAPSHOT/org.slf4j.LoggerFactory.findPossibleStaticLoggerBinderPathSet(LoggerFactory.java:310)
  	at ModuleConnectLoader-org.ops4j.pax.logging.pax-logging-api/org.ops4j.pax.logging.pax-logging-api at 2.0.15.SNAPSHOT/org.slf4j.LoggerFactory.bind(LoggerFactory.java:146)
  	... 10 more
  {noformat}
  
  Error should be more descriptive.
Priority:             Minor
Reporter:             Oliver Lietz
Severity:             enhancement


==============================
 This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)



More information about the slf4j-dev mailing list