0

I WAS running an application on my Windows 10 machine.

  • Processor: Intel Core i7-5600U CPU @ 2.6GHz 2.59GHz
  • Installed memory (RAM): 8.00 GB (7.88 GB usable)
  • System type: 64-bit Op Sys, x64-based processor

I STARTED with Maven version 3.5.3 which HAD been working fine. "After a bit" (used to indicate an indefinite period of time), I began getting the following error:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

I am aware that this error has been reported on multiple posts on this and other websites - most importantly at slf4j.org. In addition, this error has been reported (with resolutions) on StackOverflow at: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" as well as other sites.

However, none of these have resolved my problem.

In fact, to remove all project-specific complexities, I created a helloworld project with the following pom file:

<project 
    xmlns="http://maven.apache.org/POM/4.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
      http://maven.apache.org/maven-4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany.app</groupId>
  <artifactId>my-app</artifactId>
  <packaging>jar</packaging>
  <version>1.0</version>
  <scope>test</scope>
  <name>my-app</name>
  <url>http://maven.apache.org</url>
</project>

I ran the command> C:\opt\maven\apache-maven-3.2.2\bin\mvn -X help:effective-pom

The error was the same, with NO effective-pom generated. I also deleted my .m2 directory and reconstructed it. Finally, I also deleted my Maven installation and installed the most up-to-date version: 3.5.3 (see output below).

C:\opt\maven\projects\my-app>C:\opt\maven\current\bin\mvn -X help:effective-pom

Outputs:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation.
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T11:49:05-08:00)
Maven home: C:\opt\maven\current\bin..
Java version: 1.8.0_112, vendor: Oracle Corporation
Java home: C:\PROGRA~1\Java\jdk1.8.0_112\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

I am already aware that the message is supposed to be only a warning. However, I am unable to get the usual maven logs - something similar to the following:

[INFO] ------------------------------------------------------------------------
[INFO] Building base_project 01.00.000
[INFO] ------------------------------------------------------------------------
[WARNING] While downloading sun-javamail:mail:1.3.1
This artifact has been relocated to javax.mail:mail:1.3.1.
http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html [INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (CLEAN TARGET FOLDER)

Finally, my settings.xml file is the default - no changes.

To restate the problem:

  • Fails to output the standard maven log messages
  • Fails to process

Any ideas?

Community
  • 1
  • 1
mc2qcriley
  • 26
  • 3
  • Did you specify the binding you wish to use? E.g., https://dzone.com/articles/adding-slf4j-your-maven – lockcmpxchg8b Mar 10 '18 at 00:50
  • Did you try any of the suggestions from the link in the error message? – SiKing Mar 10 '18 at 01:38
  • Do you understand the explanation at http://www.slf4j.org/codes.html#StaticLoggerBinder ? – Thorbjørn Ravn Andersen Mar 12 '18 at 07:19
  • @SiKing, As I mentioned above, yes (since that was also in the cited links), I verified that the cited links couldn't resolve the problem. – mc2qcriley Mar 12 '18 at 16:09
  • @Thorbjørn Ravn Andersen, it should be clear from my explanantion of actions taken, that I understand the explanation. Please note that I have removed ALL logging. Unless the super pom includes a logger, there should be no issue of this error occuring. I will be reviewing the super pom now to identify any logging which it includes in the cp. – mc2qcriley Mar 12 '18 at 16:09
  • @Thorbjørn Ravn Andersen, to be clear, the requirement is one and only one of the listed loggers allowed to satisfy the binding requirement - incl dependency bindings. – mc2qcriley Mar 12 '18 at 16:14
  • The explanation from the link is: "This happens when no appropriate SLF4J binding could be found on the class path. Placing one (and only one) of slf4j-nop.jar slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem." Where in your helloworld project pom did you do this?!?! – SiKing Mar 23 '18 at 22:54

0 Answers0