You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Matt Sicker (JIRA)" <ji...@apache.org> on 2014/01/05 19:38:50 UTC

[jira] [Updated] (LOG4J2-377) NPE during shutdown.

     [ https://issues.apache.org/jira/browse/LOG4J2-377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Sicker updated LOG4J2-377:
-------------------------------

    Attachment: 0001-Fix-LOG4J2-377.patch

This should fix this bug. The main idea is to load NullConfiguration as soon as possible so that during shutdown we'll still have an instance to use regardless of classpath.

> NPE during shutdown.
> --------------------
>
>                 Key: LOG4J2-377
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-377
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-beta9
>         Environment: OSGi R5 / R4 (Apache Felix 4.x)
>            Reporter: Roland Weiglhofer
>            Priority: Critical
>         Attachments: 0001-Fix-LOG4J2-377.patch
>
>
> NPE in Log4j2-core during shutdown.
> g! Exception in thread "Thread-2" java.lang.NullPointerException
> 	at org.apache.felix.framework.BundleWiringImpl.diagnoseClassLoadError(BundleWiringImpl.java:2625)
> 	at org.apache.felix.framework.BundleWiringImpl.access$700(BundleWiringImpl.java:75)
> 	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1967)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> 	at org.apache.logging.log4j.core.LoggerContext.stop(LoggerContext.java:210)
> 	at org.apache.logging.log4j.core.LoggerContext$ShutdownThread.run(LoggerContext.java:437)
> Exception in thread "Thread-6" java.lang.NullPointerException
> 	at org.apache.felix.framework.BundleWiringImpl.diagnoseClassLoadError(BundleWiringImpl.java:2625)
> 	at org.apache.felix.framework.BundleWiringImpl.access$700(BundleWiringImpl.java:75)
> 	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1967)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> 	at org.apache.logging.log4j.core.LoggerContext.stop(LoggerContext.java:210)
> 	at org.apache.logging.log4j.core.LoggerContext$ShutdownThread.run(LoggerContext.java:437)
> It's a ClassLoader-issue. I guess that log4j2-core uses the bootstrap-classloader but not the bundle-classloaer.



--
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