Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get rid of the "Class path contains multiple SLF4J bindings" warning?

This is more-or-less a "common" question, however, I haven't managed to find a good answer yet. So, again, here is the warning:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/eualin/.m2/repository/org/slf4j/slf4j-jcl/1.6.0/slf4j-jcl-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/eualin/.m2/repository/org/slf4j/slf4j-log4j12/1.5.11/slf4j-log4j12-1.5.11.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

And here are two potential solutions to the problem [1][2].

Assuming that they will both work for me, obviously, they are just hacks, and I am not sure if I should rely on any of them at all. What would you recommend me? Keep in mind that the warning does not appear when in terminal; only when I run the application through IntelliJIDEA.

Any suggestion is highly appreciated.

like image 289
user706838 Avatar asked Jan 15 '23 06:01

user706838


1 Answers

In my particular case, I got this error in IntelliJ IDEA, and refreshing Gradle fixed this error:

enter image description here

You can find this window from View..Tool Windows..Gradle.

Our setup is:

  • IntelliJ IDEA v15
  • Gradle
  • Jenkins
  • SVN
like image 186
Contango Avatar answered Jan 30 '23 07:01

Contango