Home > Software design >  Apache James 3.7.2 Spring - SLF4J: No SLF4J providers were found
Apache James 3.7.2 Spring - SLF4J: No SLF4J providers were found

Time:12-04

I downloaded a binary distribution of Apache James, the Spring wired distribution.

I run it but I get the below error:

C:\prod\james-server-spring-app-3.7.2\bin>run

SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J: Ignoring binding found at [jar:file:/C:/prod/james-server-spring-app-3.7.2/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.
https://james.apache.org/server/monitor-logging.html

The distribution is unchanged but in "\conf" folder there is not the "log4j.properties" as stated in the official documentation.

Instead there is the "log4j2.xml" file.

In "\lib" folder there are the below libs:

  • slf4j-api-2.0.1.jar
  • log4j-api-2.17.1.jar
  • log4j-core-2.17.1.jar
  • log4j-slf4j-impl-2.17.1.jar

Please could someone help me to start James in mode that I can follow the activities?

Thank you in advance. Ivano

CodePudding user response:

SOLVED

The important message is the below:

SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.

So I replaced the libs distribued from Apache James community with the below libs:

  • log4j-api-2.19.0.jar
  • log4j-core-2.19.0.jar
  • log4j-slf4j2-impl-2.19.0.jar
  • slf4j-api-2.0.5.jar

The above combination of libs makes slf4j happy to works with log4j log provider.

  • Related