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

OSGi support is broken in Log4j2 2.7

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7
    • 2.8
    • Core
    • None
    • Apache Felix, Java 8

    Description

      Log4j2 2.7 fails to initialise in an OSGi environement complaining that java.lang.NoClassDefFoundError: org/apache/logging/log4j/Logger.

      Running the OSGi tests on Log4j API also fails:
      org.apache.logging.log4j.osgi.felix.FelixLoadApiBundleTest
      testMissingImportOfCoreOsgiPackage(org.apache.logging.log4j.osgi.felix.FelixLoadApiBundleTest) Time elapsed: 1.031 sec <<< ERROR!
      org.osgi.framework.BundleException: Activator start error in bundle org.apache.logging.log4j.core [2].
      Caused by: java.lang.NoClassDefFoundError: org/apache/logging/log4j/Logger
      Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.Logger not found by org.apache.logging.log4j.core [2]

      [... likewise for the other tests and equinox]

      Attachments

        1. patch-log4j2-1637.diff
          27 kB
          Ludovic HOCHET

        Issue Links

          Activity

            People

              rpopma Remko Popma
              lhochet Ludovic HOCHET
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: