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

NPE in ClassLoaderContextSelector

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta9
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: