-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" #133
Comments
Hi, |
Looks like this was introduced on 1.6.10 -> https://github.com/spotbugs/spotbugs-gradle-plugin/blob/1.6.10/src/main/java/com/github/spotbugs/SpotBugsPlugin.java#L189 Previously, no trace of sl4fj |
This problem is also happening for me. It appears to be some interaction between the spring boot gradle plugin and this plugin. I tried adding slf4j-api and logback-classic to the classpath used by Spotbugs but it did not fix the issue, not sure why. |
add "org.slf4j:slf4j-nop:1.7.25" to the build.gradle |
I tried that before but it did not help. |
Still a problem. Can confirm it's something related to the spring boot plugin. Here's my plugins {
id 'application'
id 'idea'
id 'com.github.ben-manes.versions' version '0.27.0'
id 'com.github.spotbugs' version '2.0.1'
id 'pmd'
id 'org.springframework.boot' version '2.2.1.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
}
repositories {
jcenter()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-dependencies:2.2.1.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
}
version = '0.1.0-SNAPSHOT'
application {
mainClassName = 'foo'
}
pmd {
ruleSets = ['java-quickstart']
}
spotbugs {
toolVersion = '4.0.0-beta4'
} Versions:
|
I am getting this with micronaut 1.3.0.M1. I also have spring's dependency management plugin. I'm not sure if that could be a culprit here since others are having issues with their spring plugins (well spring boot) as well. here's a portion of my
|
Please try the latest version 4.0.x instead of 3.0.0. |
we cannot use > 2.0.0, because of multi-module mono-repo. how to fix that problem with gradle plugin 2.0.0? |
Duplicate of #136 |
I'll close this duplicated issue. use #136 instead. |
still the same problem here |
Hello,
I have detected a problem in the plugin after upgraded to a newer version from 1.6.9.
This problem occurs in the version 1.6.10 / 1.6.11 / 1.7.0.
It happens on Java 8 and Java 11 also.
Gradle used: 5.2.1
As I observed it happens only if I have a project with Spring Boot (so this error will be present in each project which uses Spring Boot).
NOTE: Even the latest version of Spring Boot uses 1.7.x for the slf4j-api dependency.
Maybe this problem occurred after upgrading to slf4j-api version 1.8.0-beta-x
I've created a sample project to reproduce the problem:
https://github.com/ati90ati/bugreport-spotbugs-gradle-plugin-logging
You can run it with this command:
./gradlew clean build -PenableSpotbugs --warning-mode all
I hope that this example helps to find a solution to the problem.
The text was updated successfully, but these errors were encountered: