SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder
I had the same issue with WebSphere 6.1. As Ceki pointed out, there were tons of jars that WebSphere was using and one of them was pointing to an older version of slf4j.
The No-Op fallback happens only with slf4j -1.6+ so anything older than that will throw an exception and halts your deployment.
There is a documentation in SLf4J site which resolves this. I followed that and added slf4j-simple-1.6.1.jar
to my application along with slf4j-api-1.6.1.jar
which I already had.
If you use Maven, add the following dependencies, with ${slf4j.version}
being the latest version of slf4j
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
This solved my issue.
Failed to load class org.slf4j.impl.StaticLoggerBinder even though StaticLoggerBinder is in Maven-Rep
slf4j-simple
is not your classpath when you ran the program. Put it in your classpath, something like java -classpath ./lib/* YourProgram
. Where lib contains your jar files.
How to solve SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder in Eclipse Tycho RCP
That depends on how you want to add logging support to your application. If you don't care about logging you can either ignore the warning or add the nop logger or simple logger from eclipse Orbit. The NatTable examples are using the simple binding for example. The target definition consumes the SLF4J binding from Orbit, the E4 example feature includes the bundle.
Related Topics
Scanner VS. Stringtokenizer VS. String.Split
How Does a Arraylist's Contains() Method Evaluate Objects
How to Solve Javax.Net.Ssl.Sslhandshakeexception Error
Why Can't Overriding Methods Throw Exceptions Broader Than the Overridden Method
How to Read and Write Xml Files
Obtaining a Powerset of a Set in Java
How Does the String Class Override the + Operator
The Best Way to Print a Java 2D Array
Most Simple Code to Populate Jtable from Resultset
How to Call the Default Deserializer from a Custom Deserializer in Jackson
Httpurlconnection Doesn't Follow Redirect from Http to Https
Javafx Fxml Controller - Constructor VS Initialize Method
How to Deploy a Javafx 11 Desktop Application with a Jre
File Upload Along with Other Object in Jersey Restful Web Service
"Program to an Interface". What Does It Mean
Java.Lang.Classnotfoundexception: Com.Mysql.Jdbc.Driver in Eclipse