Error :-
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/rm694/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.3/7c4f3c474fb2c041d8028740440937705ebb473a/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/rm694/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-jdk14/1.7.30/d35953dd2fe54ebe39fdf18cfd82fe6eb35b25ed/slf4j-jdk14-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/rm694/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-nop/1.7.30/55d4c73dd343efebd236abfeb367c9ef41d55063/slf4j-nop-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
dependencies in my build.gradle :-
dependencies {
classpath(“org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:${sonarqubeVersion}”)
classpath “org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}”
classpath “io.spring.gradle:dependency-management-plugin:${springGradlePluginVersion}”
classpath “org.cloudfoundry:cf-gradle-plugin:${cloudfoundryPluginVersion}”
classpath “gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:${gitGradlePluginVersion}”
}
}
This is my config server for a spring batch project where we use gradle and when I start to run my config server after running the eureka server – I’m getting this error, I tried excluding slf4j module in my build.gradle file but I’m unable to get rid of this error then also, I need a solid solution to clear this run to run my config server. Let me know if I am missing something.
Roshan M is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Can you please check in this link SLF4J: Class path contains multiple SLF4J bindings
Generally if same dependency is being included because of transitive dependencies then We can exclude that from conflicted dependencies. This works as well have done the same through maven.
The error you’re seeing indicates that there are multiple SLF4J bindings in your classpath. This can cause logging issues, as SLF4J expects only one binding.
You’ve got logback-classic, slf4j-jdk14, and slf4j-nop bindings. Decide which one you want to use. Commonly, logback-classic is used for more advanced logging features.