0

Tomcat: 7.0.90

Java: 1.8.0_161

Ant project

I'm having a problem while configuring the log4j jars as suggested in the https://logging.apache.org/log4j/2.x/manual/migration.html using the bridge.

Long story short, I've removed the old jar files and added the new ones(the bridge, the log4j2 jar and the core jar). I've also removed the old jar from the classpath and added the new ones there.

When I attempt to run the project, it's running as it was running before, however no logs are getting generated.

From the Tomcat logs though, I can see the information message: At least one JAR was scanned for TLDs yet contained no TLDs.

I think that the error might occur due to the log4j2 jar, which gets compiled in java 9 as far as I've read in other articles. However, the java 9 part of the code is located in the META-INF folder, which means that it should be ignored(correct me if I'm wrong).

Thanks in advance for any help!

Bittnutz
  • 23
  • 1
  • 4
  • Did you set the system property `log4j1.compatibility=true` as in the documentation you cite? – Piotr P. Karwasz Jan 31 '22 at 20:20
  • unfortunately, I'm not able to locate it. Do you know, perhaps, where I can look for it? I checked in some of the configuration files, but couldn't find anything. – Bittnutz Feb 01 '22 at 08:30
  • 1
    It's a Java system property. Check [this question](https://stackoverflow.com/q/70843538/11748454) for a list of ways to configure it. – Piotr P. Karwasz Feb 01 '22 at 08:39
  • uhm, I've set -Dlog4j1.compatibility=true in the tomact launch configuration. Thе error still occurs, unfortunately. (I've used only one of the steps as the reference which I cited says "Enable the Log4j 1.x bridge via one of the following steps:") – Bittnutz Feb 02 '22 at 13:32

1 Answers1

0

As Piotr P. Karwasz stated in the comments of the question, the issue was resolved using the links he provided. Just a quick reminder, investigate your log4j1 configurations carefully and follow the tips in the links above.

Bittnutz
  • 23
  • 1
  • 4