XML deserialization fails for pedigree/commits on a metadata/tools/components component
Los mantenedores suelen responder en 1 día
@Dushyant7090 ya está trabajando en esto.
Desde el 24/9/2026.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start with org.cyclonedx.parsers.XmlParser and the metadata/tools path in ToolInformationDeserializer, then reproduce the supplied XML with XmlParser.parse(). Compare this path with the working JSON and top-level component cases; done means the minimal XML parses successfully and the serialized structure round-trips without the reported ArrayList mapping error.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
A CycloneDX 1.5 BOM whose metadata → tools → components component carries a pedigree with commits/commit cannot be deserialized from XML. XmlParser.parse() throws while mapping
Pedigree.commits. The same document deserializes fine as JSON, and the same pedigree/commit on a top-level component deserializes fine from XML — so this is specific to the XML +
tools-component code path. The library will happily serialize this structure but then cannot read its own output, breaking round-tripping.
Version
org.cyclonedx:cyclonedx-core-java:13.2.0 (latest on Maven Central). Runtime: jackson-databind/jackson-dataformat-xml 2.22.2, woodstox-core 7.2.0.
Minimal reproduction
Parse the following (minimal — everything non-essential removed) with new XmlParser().parse(bytes):
<?xml version="1.0" encoding="UTF-8"?>
<bom xmlns="http://cyclonedx.org/schema/bom/1.5">
<metadata>
<tools>
<components>
<component type="application">
<name>t</name>
<pedigree>
<commits>
<commit>
<uid>u</uid>
</commit>
</commits>
</pedigree>
</component>
</components>
</tools>
</metadata>
</bom>
Code to reproduce
byte[] xml = Files.readAllBytes(Path.of("trigger.xml"));
new org.cyclonedx.parsers.XmlParser().parse(xml); // throws
Stack tracke:
org.cyclonedx.exception.ParseException: com.fasterxml.jackson.databind.JsonMappingException:
Cannot deserialize value of type `java.util.ArrayList<org.cyclonedx.model.Commit>` from Object value (token `JsonToken.START_OBJECT`)
(through reference chain: org.cyclonedx.model.Component["pedigree"]->org.cyclonedx.model.Pedigree["commits"]) (through reference chain: org.cyclonedx.model.Bom["metadata"])
at org.cyclonedx.parsers.XmlParser.parse(XmlParser.java:101)
...
Caused by: java.lang.IllegalArgumentException: Cannot deserialize value of type `java.util.ArrayList<org.cyclonedx.model.Commit>` from Object value (token `JsonToken.START_OBJECT`)
at com.fasterxml.jackson.databind.ObjectMapper.convertValue(ObjectMapper.java:4661)
at org.cyclonedx.util.deserializer.ToolInformationDeserializer.parseComponents(ToolInformationDeserializer.java:71)
at org.cyclonedx.util.deserializer.ToolInformationDeserializer.parseToolInformation(ToolInformationDeserializer.java:49)
at org.cyclonedx.util.deserializer.ToolInformationDeserializer.deserialize(ToolInformationDeserializer.java:43)
at org.cyclonedx.util.ToolsJsonParser.parse(ToolsJsonParser.java:49)
at org.cyclonedx.util.deserializer.MetadataDeserializer.deserialize(MetadataDeserializer.java:91)
...
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.util.ArrayList<org.cyclonedx.model.Commit>` from Object value (token
`JsonToken.START_OBJECT`)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.handleNonArray(CollectionDeserializer.java:404)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:253)
Open PR #833 appears to address exactly this path but is not yet merged/released.
- Lenguaje dominante
- Java
- Estrellas
- 122
- Forks
- 92
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 10
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CycloneDX/cyclonedx-core-java
-
breaking change
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CycloneDX/cyclonedx-core-java#917 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CycloneDX/cyclonedx-core-java#819 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CycloneDX/cyclonedx-core-java#681 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
CycloneDX/cyclonedx-core-java#938 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
CycloneDX/cyclonedx-core-java#902 ·
Los mantenedores suelen responder en 1 día
Todos los issues de CycloneDX/cyclonedx-core-java
Issues similares
-
RRateLimiter acquire methods accept negative permits and raise available permits above the rate.Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 4 días
-
README 中的代码语言数量与当前目录不一致Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
krahets/hello-algo#1993 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
NationalSecurityAgency/ghidra#9884 ·
Los mantenedores suelen responder en 2 días
-
Status: Pending Review Type: Feature Request
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
OpenRefine/OpenRefine#8019 ·
Los mantenedores suelen responder en 1 día
-
[TEMP] pin maven version to 3.9.xPosiblemente ocupada @petrenyi-mark la tomó hoy. Abierto
Dificultad 2/5 Menos de una hora Aptitud para principiantes 62/100