-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Could not create an instance of type com.github.spotbugs.internal.spotbugs.SpotBugsExecutor #120
Comments
I hope this comment helps your case. Could you check that? |
I have a hard time understanding what triggers this exception. Yes, we do use Guava 23.0 internally, but what code path is trying to use a method that's available from 23.1? It sure isn't coming from our own code. FWIW, we're getting this error while trying to update Gradle 4.10.3 -> 5.2.1, SpotBugs 3.1.7 -> 3.1.12 and SpotBugs Gradle plugin 1.6.3 -> 1.6.10. |
Could you make mcve project to reproduce this issue? It helps us to find why/how this problem is caused. |
Sorry, it looks like it was a false alarm with regard to SpotBugs. I was able to track it down to another Gradle plugin that depends on an ancient version of guava, version 18.0: buildscript {
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.6'
}
} The workaround was to force guava >= 23.0.1 to be on that same buildscript classpath. It looks like it could be a bug in Gradle, where stuff on different classpaths may leak between contexts. However, I have no idea where the newer guava is leaking in. Helpful references: |
The project is private so I can not share it with you. However what @slovdahl wrote helped me. I have added exclude for guava from the classpath and it helped me. I am not sure whether it is a good solution but at least some work around.
|
Does this plugin depend on Guava? What should I do if I don't want to declare specifically Guave dependency in my build file? |
The |
In my case this workaround helped:
|
Hi all,
I am migrating my gradle project to the newest version - 5.0 -> 5.2.1.
In my project spotbug is used. The current version of spotbug plugin is 1.6.4, spotbug version is 3.1.8.
On the old version of gradle everything works fine. However on the new version I got such error.
I tried to update sportbug to version 3.1.12, plugin to version 1.6.10. However it didn't help.
Could you help?
The text was updated successfully, but these errors were encountered: