[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-dev
Subject:    [jira] [Commented] (LOG4J2-477) NPE in ClassLoaderContextSelector
From:       "Tal Liron (JIRA)" <jira () apache ! org>
Date:       2013-12-24 9:21:51
Message-ID: JIRA.12686057.1387715933272.7809.1387876911397 () arcas
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/LOG4J2-477?page=com.atlassian.jira.plugin. \
system.issuetabpanels:comment-tabpanel&focusedCommentId=13856245#comment-13856245 ] 

Tal Liron commented on LOG4J2-477:
----------------------------------

Actually, I'm quite certain that my fix is not good: the NPE disappears, but it looks \
like the log4j configuration is loaded multiple times. I hope you can suggest a \
better fix.

> NPE in ClassLoaderContextSelector
> ---------------------------------
> 
> Key: LOG4J2-477
> URL: https://issues.apache.org/jira/browse/LOG4J2-477
> Project: Log4j 2
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.0-beta9
> Reporter: Tal Liron
> Assignee: Remko Popma
> 
> 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: {code}
> 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)
>  {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic