Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-155

NPE on LoggerFactory.singleImplementationSanityCheck

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • None
    • 1.5.x
    • Core API
    • None
    • Operating System: Linux
      Platform: PC

    Description

      This occurs on slf4j-api 1.5.7 and 1.5.8 when using logback 0.9.18
      It does not occur on slf4j-api 1.5.6

      Note: the environment being used has various java.endorsed.dirs setup where the logging is initialized. This being not very normal, it could be the reason for this NPE, as I believe LoggerFactory.class.getClassLoader() will return null in this scenario.

      java.lang.NullPointerException
      at org.slf4j.LoggerFactory.singleImplementationSanityCheck(LoggerFactory.java:192)
      at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:113)
      at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:269)
      at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
      at org.eclipse.jetty.util.log.Slf4jLog.<init>(Slf4jLog.java:33)
      at org.eclipse.jetty.util.log.Slf4jLog.<init>(Slf4jLog.java:28)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at java.lang.Class.newInstance0(Class.java:355)
      at java.lang.Class.newInstance(Class.java:308)

      Attachments

        Activity

          People

            slf4j-dev SLF4J developers list
            joakim.erdfelt@gmail.com Joakim Erdfelt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: