1

I'm building a Java API and this happens on my vsCode when I try to debug my main class :

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/CDINDELE/.m2/repository/org/slf4j/slf4j-log4j12/1.7.25/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]

I know this is a exclusion issue, so I've excluded the slf4j from my dependencies like this:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<exclusions>
     <exclusion>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-over-log4j12</artifactId>
      </exclusion>
 </exclusions>
</dependency>

It works well with mvn install, and my API is working great with

java -jar myWar

However when I'm trying to use the debug with vscode on my main class (using the java plugin) the issue is coming back so it's impossible for me to debug this app which is not very convenient.

Any ideas ? Thanks

Bharti Rawat
  • 1,881
  • 18
  • 31
Cesar
  • 413
  • 7
  • 19
  • please check this link: https://stackoverflow.com/questions/19656496/multiple-slf4j-bindings-cause-error?rq=1 – Killer Feb 01 '19 at 13:35
  • @Killer As I said, It works great when I'm building the war, so it should be good, it's not working when I'm debugging the app – Cesar Feb 01 '19 at 13:39

0 Answers0