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

NPE in ClassLoaderContextSelector

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-beta9
    • None
    • Core
    • None

    Description

      The problem is that some classes don't have class loaders: this can happen when working with dynamic JVM languages (Rhino, Jython, etc.)

      Here's the stack trace I got:

      java.lang.NullPointerException
      	at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.locateContext(ClassLoaderContextSelector.java:182)
      	at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:145)
      	at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:81)
      	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:83)
      	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:34)
      

      Attachments

        Issue Links

          Activity

            People

              rpopma Remko Popma
              emblemparade Tal Liron
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: