Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"

Got this error on Eclipse Juno 4.2 when running a maven project.

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 not using slf4j for logging. Actually i dont use any logging.

What am i doing wrong.?

The only dependency in my pom.xml

<dependencies>
   <dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
     <version>4.10</version>
     <scope>test</scope>
    </dependency>   
</dependencies>

Edit:

mvn dependency:tree

[INFO] \- junit:junit:jar:4.10:test
[INFO]    \- org.hamcrest:hamcrest-core:jar:1.1:test

Edit 2:

I created a New Maven Project-->maven-archetype-quickstart. After that i run clean install and eclipse console shows the above error. I did not even write any part of code yet. Even if i delete the sample src java file and sample test java file it produces the same error.


Edit 3:

I run the project outside of Eclipse and there was no error indication.

like image 968
javaG Avatar asked Nov 18 '12 01:11

javaG


1 Answers

Eclipse Juno and Indigo, when using the bundled maven version(m2e), are not suppressing the message SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". This behaviour is present from the m2e version 1.1.0.20120530-0009 and onwards.

Although, this is indicated as an error your logs will be saved normally. The highlighted error will still be present until there is a fix of this bug. More about this in the m2e support site.

The current available solution is to use an external maven version rather than the bundled version of Eclipse. You can find about this solution and more details regarding this bug in the question below which i believe describes is the same problem you are facing.

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". error

like image 189
Konstantinos Margaritis Avatar answered Nov 07 '22 14:11

Konstantinos Margaritis