CycloneDX / cyclonedx-gradle-plugin

Creates CycloneDX Software Bill of Materials (SBOM) from Gradle projects
https://cyclonedx.org/
Apache License 2.0
162 stars 77 forks source link

Encountered java.lang.NoSuchMethodError when executing the cyclonedxBom task #540

Open IshikaDawda opened 1 day ago

IshikaDawda commented 1 day ago

Describe the bug Suddenly I am experiencing a java.lang.NoSuchMethodError while executing the cyclonedxBom task, which resulted in the complete failure of the task. (Please note this task was previously executing successfully.)

Expected behavior The gradle task should execute successfully like before.

Environment:

tkrah commented 14 hours ago

If I would have to guess, see here: https://github.com/CycloneDX/cyclonedx-gradle-plugin/issues/482 where I had a similar problem. Your plugins classpath has different versions of that library and this is obviously a problem. You need to look at ALL your plugins and their dependencies and make sure, they have compatible libraries (not a nice task I know but that is the only thing you can do) - it is no bug in this plugin itself, but a conflict between this one and another you are using.

IshikaDawda commented 10 hours ago

The project was functioning well with this version; however, it has recently started to throw this exception unexpectedly. Furthermore, as you mentioned I have attempted to align the versions of the dependencies, yet the issue persists. Here is the Gradle build file: