Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-640

java.lang.NullPointerException cause by NULLThread.currentThread().getContextClassLoader() when logging

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0-rc1
    • 2.0-rc2
    • Core
    • None
    • Linux,java 1.6

    Description

      EXCEPTION:
      java.lang.NullPointerException
      at org.apache.logging.log4j.core.impl.ThrowableProxy.loadClass(ThrowableProxy.java:468)
      at org.apache.logging.log4j.core.impl.ThrowableProxy.resolvePackageData(ThrowableProxy.java:395)
      at org.apache.logging.log4j.core.impl.ThrowableProxy.<init>(ThrowableProxy.java:97)
      at org.apache.logging.log4j.core.impl.Log4jLogEvent.<init>(Log4jLogEvent.java:114)
      at org.apache.logging.log4j.core.impl.Log4jLogEvent.<init>(Log4jLogEvent.java:90)
      at org.apache.logging.log4j.core.impl.DefaultLogEventFactory.createEvent(DefaultLogEventFactory.java:49)
      at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:365)
      at org.apache.logging.log4j.core.Logger.log(Logger.java:112)
      at org.apache.logging.log4j.spi.AbstractLogger.error(AbstractLogger.java:605)
      at com.taobao.security.sm.service.manager.SmServiceConfigManager.handleAppConfig(SmServiceConfigManager.java:133)

      SOURCE:
      loadClass() in ThrowableProxy.java:
      clazz = Thread.currentThread().getContextClassLoader().loadClass(className);

      REASON:
      Thread.currentThread().getContextClassLoader() return null to raise NullPointerException.

      pls fix it.

      Attachments

        Activity

          People

            mattsicker Matt Sicker
            claude1024 LIUJIAN
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: