CycloneDX / CycloneDX/cyclonedx-gradle-plugin

CyclonedxBom task fails due to noSuchMethod error in fasterxml.jackson.dataformat

Open
#103 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
240
Forks
103
Avg merge
1d 9h
Merged PRs (30d)
11

Description

I am using the cyclonedx-gradle-plugin version 1.4.0 for Kotlin on Ubuntu 18.0. I get the following output when I run the
cycloneDx task -

> Task :cyclonedxBom FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':cyclonedxBom'.
> com.fasterxml.jackson.databind.cfg.MutableCoercionConfig com.fasterxml.jackson.dataformat.xml.XmlMapper.coercionConfigDefaults()`

`
Caused by: java.lang.NoSuchMethodError: 'com.fasterxml.jackson.databind.cfg.MutableCoercionConfig com.fasterxml.jackson.dataformat.xml.XmlMapper.coercionConfigDefaults()'
at com.fasterxml.jackson.dataformat.xml.XmlMapper.(XmlMapper.java:176)
at com.fasterxml.jackson.dataformat.xml.XmlMapper.(XmlMapper.java:145)
at com.fasterxml.jackson.dataformat.xml.XmlMapper.(XmlMapper.java:127)
at org.cyclonedx.generators.xml.AbstractBomXmlGenerator.(AbstractBomXmlGenerator.java:48)
at org.cyclonedx.generators.xml.BomXmlGenerator13.(BomXmlGenerator13.java:42)
at org.cyclonedx.BomGeneratorFactory.createXml(BomGeneratorFactory.java:46)
at org.cyclonedx.gradle.CycloneDxTask.writeXMLBom(CycloneDxTask.java:384)
at org.cyclonedx.gradle.CycloneDxTask.writeBom(CycloneDxTask.java:373)
at org.cyclonedx.gradle.CycloneDxTask.createBom(CycloneDxTask.java:176)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
`

Contributor guide

Open the contributing guide

Research direction

Start with the cyclonedxBom task failure and inspect the dependency versions resolved for com.fasterxml.jackson.dataformat.xml and com.fasterxml.jackson.databind. Trace the stack from org.cyclonedx.gradle.CycloneDxTask.writeXMLBom through XmlMapper, then reproduce on the reported plugin version and verify that the task completes without the NoSuchMethodError.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.