FasterXML / jackson-dataformats-text

Uber-project for (some) standard Jackson textual format backends: csv, properties, yaml (xml to be added in future)
Apache License 2.0
404 stars 148 forks source link

Snakeyaml version used produces java.lang.NoSuchMethodError #463

Closed NikitaDergunov closed 7 months ago

NikitaDergunov commented 7 months ago

This code: var mapper = new ObjectMapper(new YAMLFactory()); try { var unprocessed = mapper.readValue(foo, bar); } produces this exception after update:

Caused by: java.lang.NoSuchMethodError: 'void org.yaml.snakeyaml.parser.ParserImpl.<init>(org.yaml.snakeyaml.reader.StreamReader)' at com.fasterxml.jackson.dataformat.yaml.YAMLParser.<init>(YAMLParser.java:178) at com.fasterxml.jackson.dataformat.yaml.YAMLFactory._createParser(YAMLFactory.java:466) at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:368) at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:15) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3817)

Please address it.

jackson-dataformat-yaml version used is : 2.16.1

yawkat commented 7 months ago

Jackson hasn't used that constructor in ages. It's a dependency issue on your end.

cowtowncoder commented 7 months ago

@NikitaDergunov We have CI that tests basic compatibility like this so as per @yawkat 's comment it is likely that you have older version of jackson-dataformat-yaml (or, conversely, very old SnakeYAML version).

Otherwise we'd need actual reproduction of the issue.

Closing assuming this is user-side version compatibility issue.