Looks like this commit is what helped with v2.14.2. https://github.com/FasterXML/jackson-dataformats-text/commit/9f822fb3fb248784f72708c4a30a8bddf9a0dc16
On Wednesday, 1 March 2023 at 11:58:00 UTC+1 Akhil Ranjan wrote: > Hi Tatu, > > Yes, this clarifies my doubt over why v2.14.1 didn't work, but the v2.14.2 > did with the new snakeyaml version. Thanks so much. > On Wednesday, March 1, 2023 at 9:53:35 AM UTC+5:30 Tatu Saloranta wrote: > >> On Tue, Feb 28, 2023 at 8:18 PM Akhil Ranjan >> <akhil....@logicmonitor.com> wrote: >> > >> > I use jackson-core:2.14.1 in my application, and I tried upgrading to >> newly released snakeyaml:2.0, to get rid of vulnerabilities in the earlier >> snakeyaml version. >> > >> > I started getting the following runtime Exception with the >> jackson-core:2.14.1 + snakeyaml:2.0 combination :- >> > >> > >> EXCEPTION=org.yaml.snakeyaml.parser.ParserImpl.<init>(Lorg/yaml/snakeyaml/reader/StreamReader;)V >> >> >> > >> > java.lang.NoSuchMethodError: >> org.yaml.snakeyaml.parser.ParserImpl.<init>(Lorg/yaml/snakeyaml/reader/StreamReader;)V >> >> >> > >> > at >> com.fasterxml.jackson.dataformat.yaml.YAMLParser.<init>(YAMLParser.java:191) >> >> > >> > at >> com.fasterxml.jackson.dataformat.yaml.YAMLFactory._createParser(YAMLFactory.java:509) >> >> >> > >> > at >> com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:413) >> >> >> > >> > at >> com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:386) >> >> >> > >> > at >> com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:15) >> >> >> > >> > at >> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3677) >> >> >> > >> > at >> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3645) >> >> >> > >> > >> > I then upgraded to jackson-core:2.14.2, and the above error was >> resolved. The latest jackson-core version worked with snakeyaml:2.0. >> > >> > I'm curious above the changes in the jackson-core v2.14.2, that makes >> it compatible with the new snakeyaml artifact. Release notes for v2.14.2 >> states the following changes >> > :- >> > >> > 2.14.2 (28-Jan-2023) #854: Backport schubfach changes from v2.15#8 >> (contributed by @pjfanning) #882: Allow TokenFIlter to skip last elements >> in arrays (contributed by Przemyslaw G) #886: Avoid instance creations in >> fast parser code (contributed by @pjfanning) #890: >> `FilteringGeneratorDelegate` does not create new `filterContext` if >> `tokenFilter` is null (contributed by @DemonicTutor) >> > Request inputs on why jackson-core:2.14.2 works with snakeyaml:2.0, but >> jackson-core:2.14.1 doesn't. >> >> As the stack trace shows, constructor of "ParserImpl": >> >> org.yaml.snakeyaml.parser.ParserImpl.<init>(Lorg/yaml/snakeyaml/reader/StreamReader;)V >> >> >> >> which version of YAML module 2.14.1 used was removed by SnakeYAML >> version 2.0 -- 1.x -> 2.x is a major version upgrade and as such not >> (guaranteed to be) backwards compatible. >> >> Also note that the version incompatibility is not with `jackson-core` >> but rather with `jackson-dataformat-yaml`. >> You probably upgraded versions of both components. >> >> Release notes for YAML module have the fix listed: >> >> #370: (yaml) Replace use of deprecated constructor of SnakeYAML >> ParserImpl >> (see https://github.com/FasterXML/jackson-dataformats-text/issues/370 ) >> >> Hope this helps, >> >> -+ Tatu +- >> > -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to jackson-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/475413c2-98ae-4279-9da0-19f763e2e68fn%40googlegroups.com.