Reputation: 198
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.
Upvotes: 5
Views: 9676
Reputation: 327
You can add this dependency:
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.7</version>
</dependency>
Or you can also add slf4j-nop slf4j-log4j12 which I haven't test.
Upvotes: 0
Reputation: 3247
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
Upvotes: 7
Reputation: 718798
I think it is actually the Maven plugin that is complaining about not having a logger. I believe this is harmless.
Upvotes: 0