question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

created a minimum stand alone:

public class App 
{
    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );
        WireMockServer wireMockServer = new WireMockServer(wireMockConfig().port(8123));
        wireMockServer.start();
    }
}

and get a warning:

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 needed to add an extra Maven dependency to remove the warnings:

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.6.4</version>
    </dependency>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5

github_iconTop GitHub Comments

5reactions
bcalmaccommented, Dec 19, 2017

How about the case of running WireMock in the terminal with java -jar wiremock-standalone.jar? Shouldn’t console logging be enabled?

$ java -jar ~/tools/wiremock-standalone-2.12.0.jar --port 9999
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.
 /$$      /$$ /$$                     /$$      /$$                     /$$
| $$  /$ | $$|__/                    | $$$    /$$$                    | $$
| $$ /$$$| $$ /$$  /$$$$$$   /$$$$$$ | $$$$  /$$$$  /$$$$$$   /$$$$$$$| $$   /$$
| $$/$$ $$ $$| $$ /$$__  $$ /$$__  $$| $$ $$/$$ $$ /$$__  $$ /$$_____/| $$  /$$/
| $$$$_  $$$$| $$| $$  \__/| $$$$$$$$| $$  $$$| $$| $$  \ $$| $$      | $$$$$$/
| $$$/ \  $$$| $$| $$      | $$_____/| $$\  $ | $$| $$  | $$| $$      | $$_  $$
| $$/   \  $$| $$| $$      |  $$$$$$$| $$ \/  | $$|  $$$$$$/|  $$$$$$$| $$ \  $$
|__/     \__/|__/|__/       \_______/|__/     |__/ \______/  \_______/|__/  \__/

port:                         9999
enable-browser-proxying:      false
no-request-journal:           false
verbose:                      false
1reaction
harti2006commented, May 7, 2019

I had to replace the semicolon with a colon, otherwise java could not find the main class

java -cp 'wiremock.jar:slf4j-nop.jar' 'com.github.tomakehurst.wiremock.standalone.WireMockServerRunner'
Read more comments on GitHub >

github_iconTop Results From Across the Web

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"
This warning message is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory. This happens when no appropriate SLF4J ...
Read more >
log4j2 - Failed to load class "org.slf4j.impl.StaticLoggerBinder"
The Java project is using log4j2, but look like some components are used SLF4J logging and caused the following error message: SLF4J: Failed...
Read more >
SLF4J Error Codes
This warning message is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory. This happens when no appropriate SLF4J ...
Read more >
SLF4J Failed to load class org slf4j impl StaticLoggerBinder
My application is to be deployed on both tcServer and WebSphere 6.1. This application uses ehCache and so requires slf4j as a dependency....
Read more >
Failed to load class "org.slf4j.impl.StaticLoggerBinder"
2. The slf4j: Failed to load class “org.slf4j.impl.StaticLoggerBinder” Error ... While working with SLF4J, you need to provide the following three ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found