[
https://issues.apache.org/jira/browse/LOG4J2-377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13754634#comment-13754634
]
Roland Weiglhofer commented on LOG4J2-377:
------------------------------------------
I have seen the issue again in my logfiles. But this time with a slightly
different trace.
This sounds very interesting:
Caused by: java.lang.ClassNotFoundException: Unable to load class
'org.apache.logging.log4j.core.config.NullConfiguration' Because The bundle
wiring for org.apache.logging.log4j api is no longer valid.
Wires are between resolved dependent bundles. If one bundle is stopped the wire
is invalid. The OSGi-container stopps bundles in order of their dependencies.
Could it be that some dependency-definitions are missing in the POMs? Could it
be that the core holds an unreleased zombie-instance of a classloader and tries
to instanciate something which is no longer in the classpath because the
provider bundle is stopped? I don't know what is going on, but thinking out
loud.
g! Exception in thread "Thread-6" java.lang.NoClassDefFoundError:
org/apache/logging/log4j/core/config/NullConfiguration
at
org.apache.logging.log4j.core.LoggerContext.stop(LoggerContext.java:210)
at
org.apache.logging.log4j.core.LoggerContext$ShutdownThread.run(LoggerContext.java:437)
Caused by: java.lang.ClassNotFoundException: Unable to load class
'org.apache.logging.log4j.core.config.NullConfiguration' because the bundle
wiring for org.apache.logging.log4j-api is no longer valid.
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1494)
at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 2 more
Exception in thread "Thread-2" java.lang.NoClassDefFoundError:
org/apache/logging/log4j/core/config/NullConfiguration
at
org.apache.logging.log4j.core.LoggerContext.stop(LoggerContext.java:210)
at
org.apache.logging.log4j.core.LoggerContext$ShutdownThread.run(LoggerContext.java:437)
> 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
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]