Hello everyone,

I am having trouble getting Log4J2 to work because it can not find the
core and I can't find resources that help me.

I'm running the whole project through IntelliJ IDEA + Gradle
I am using AdoptOpenJdk 11.0.4 as runtime and Apache Felix 6.0.3 as OSGi

Here is the small Apache Felix configuration file:

To test if Log4J2 actually works I wrote a small test bundle containing
only the bundle activator

Once I start the application all bundles are started (or for the
fragment bundles resolved):
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (6.0.3)|6.0.3
    1|Active     |    1|org.objectweb.asm (9.0.0)|9.0.0
    2|Active     |    1|org.objectweb.asm.tree.analysis (9.0.0)|9.0.0
    3|Active     |    1|org.objectweb.asm.commons (9.0.0)|9.0.0
    4|Active     |    1|org.objectweb.asm.tree (9.0.0)|9.0.0
    5|Active     |    1|org.objectweb.asm.util (9.0.0)|9.0.0
    6|Active     |    1|cap5lut-service-test
    7|Active     |    1|JLine Bundle (3.7.0)|3.7.0
    8|Active     |    1|Apache Log4j API (2.14.0)|2.14.0
    9|Active     |    1|Apache Log4j Core (2.14.0)|2.14.0
   10|Active     |    1|Apache Aries SPI Fly Dynamic Weaving Bundle
   11|Resolved   |    1|Apache Aries SPI Fly Dynamic Weaving Framework
Extension (1.3.2)|1.3.2
   12|Active     |    1|Apache Felix Gogo Command (1.1.0)|1.1.0
   13|Active     |    1|Apache Felix Gogo JLine Shell (1.1.0)|1.1.0
   14|Active     |    1|Apache Felix Gogo Runtime (1.1.0)|1.1.0

But I still get the error ERROR StatusLogger Log4j2 could not find a
logging implementation. Please add log4j-core to the classpath. Using
SimpleLogger to log to the console...

From my little understanding of the OSGi logs I thought everything
would be wired correctly as I dont see any warnings or errors, but that
doesnt seem to be the case.
So here are the complete logs

What do I do wrong?


Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.

To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to