spotbugs-gradle-plugin
spotbugs-gradle-plugin copied to clipboard
spotbugsMain task in Gradle throws ExceptionInInitializerError
Our build runs ./gradlew --info spotbugsMain task.
We're using toolVersion = '4.1.3'
This is throwing the following error in one of our subprojects:
java.lang.ExceptionInInitializerError
at java.base/java.lang.J9VMInternals.ensureError(J9VMInternals.java:186)
at java.base/java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:175)
at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:59)
at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:73)
Caused by: java.lang.NullPointerException
at worker.org.gradle.internal.classloader.FilteringClassLoader.<clinit>(FilteringClassLoader.java:51)
... 2 more
Then later on, another subproject fails with
* What went wrong:
Execution failed for task ':extension-relational-extent:spotbugsMain'.
> A failure occurred while executing com.github.spotbugs.snom.internal.SpotBugsRunnerForWorker$SpotBugsExecutor
> Failed to run Gradle Worker Daemon
> Process 'Gradle Worker Daemon 98' finished with non-zero exit value 1
Is the issue the number of Gradle Worker Daemon's ?
Have you seen this before ?
Thanks, Sunny
Thanks for opening your first issue here! :smiley: Please check our contributing guideline. Especially when you report a problem, make sure you share a Minimal, Complete, and Verifiable example to reproduce it in this issue.
I have fixed the same error just today, and in my case there was a transitive dependency in my project with groovy-all-2.5.13, while my project included a 2.5.+ version that was different (2.5.14). I just excluded the 2.5.13 from the transitive deps and I fixed it. The --info or --debug flag output told me that the problem was in groovy-datetime 2.5.13 vs 2.5.14. Hope it helps.
Please share mcve project to reproduce the issue in our local.
I'm sorry, but 10 months passed and I don't remember the context where I met this issue. In the meantime I moved all the projects on Groovy 3 and a different version of Gradle.
Il giorno ven 22 ott 2021 alle ore 06:29 Kengo TODA < @.***> ha scritto:
Please share mcve project https://stackoverflow.com/help/minimal-reproducible-example to reproduce the issue in our local.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/spotbugs/spotbugs-gradle-plugin/issues/358#issuecomment-949278113, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALDCZTDZSX7RCOIDWQO5QYTUIDSDDANCNFSM4SKOPSQA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
OK thank you! If @sunnypatel2141 brings no MCVE too, I will close this issue.