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
Attachments
Issue Links
- is duplicated by
-
LOG4J2-1747 Improper class bundling for an OSGi container's environment.
- Resolved
- is related to
-
LOG4J2-1660 ThreadContext to expose ReadOnlyThreadContextMap internal data structure
- Closed
- is superceded by
-
LOG4J2-1664 Improve OSGi unit tests
- Closed
- relates to
-
LOG4J2-920 ClassNotFoundException for BundleContextSelector when initialising in an OSGi environment
- Closed
-
LOG4J2-1658 2.7 - ThreadContextAccess.getThreadContextMap NPE when specifying BasicContextSelector
- Closed