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

1,186 views
Skip to first unread message

Jeffrey Quach

unread,
Apr 30, 2017, 11:25:33 PM4/30/17
to vert.x
Hi guys,

I'm getting this error when I run my app using gradle.  I can start the application fine when I run ./gradlew run, but when I go to run unit tests with ./gradlew test it throws that error and can't proceed to actually perform the tests.  Here's the relevant bit from the stacktrace:

    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.


    MLog initialization issue: slf4j found no binding or threatened to use its (dangerously silent) NOPLogger. We consider the slf4j library not found.


    Apr 30, 2017 11:19:14 PM com.mchange.v2.log.MLog


    INFO: MLog clients using java 1.4+ standard logging.


    Apr 30, 2017 11:19:14 PM com.mchange.v2.c3p0.C3P0Registry


    INFO: Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]


I've tried adding slf4j as a dependency and it doesn't seem to do anything other than produce more errors related to logging.

I'm using the vertx logger so that may be the cause.  I did see an issue on the vertx github repo indicating this may be related to Netty but I'm not too sure how to get around this issue.

If anyone could help that'd be great!  I'll gladly provide more info if necessary.

Thanks

Alexander Lehmann

unread,
May 1, 2017, 4:50:59 AM5/1/17
to vert.x
Vert.x is compiled with slf4j-api, but does not include a logging implementation (same with netty I think), so you have to include slf4j-simple as a runtime dependency (or another logging impl that you want to use). Not sure about Mlog, but that probably tries to use slf4j as well.

Could you post a small reproducer project that shows the issue?

Jeffrey Quach

unread,
May 7, 2017, 2:38:51 PM5/7/17
to vert.x
Yes I'll try to post a reproducer project when I have time.  Right now it seems to be a bunch of warnings without affecting the main functionality of the app
Reply all
Reply to author
Forward
0 new messages