Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta9
    • Fix Version/s: 2.0-rc1, 2.0
    • Component/s: Core
    • Labels:
      None
    • Environment:

      OSGi R5 / R4 (Apache Felix 4.x)

      Description

      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.

        Issue Links

          Activity

          Matt Sicker made changes -
          Link This issue is duplicated by LOG4J2-440 [ LOG4J2-440 ]
          Remko Popma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.0-rc1 [ 12325011 ]
          Fix Version/s 2.0 [ 12324757 ]
          Resolution Fixed [ 1 ]
          Matt Sicker made changes -
          Attachment 0001-Fix-LOG4J2-377.patch [ 12621528 ]
          Roland Weiglhofer made changes -
          Field Original Value New Value
          Description 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)
          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.
          Roland Weiglhofer created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Roland Weiglhofer
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development