yaml-path / YamlPath

Apache License 2.0
20 stars 5 forks source link

java.lang.NoSuchMethodError at YamlPath.from() #173

Closed augustd closed 7 months ago

augustd commented 7 months ago

I'm using the latest version of YamlPath:

    <dependency>
      <groupId>io.github.yaml-path</groupId>
      <artifactId>yaml-path</artifactId>
      <version>0.0.11</version>
    </dependency>

This may most likely be a Jackson issue, but when I call YamlPath.from( String ) I get a NoSuchMethodError:

Exception in thread "main" java.lang.NoSuchMethodError: 'void org.yaml.snakeyaml.parser.ParserImpl.<init>(org.yaml.snakeyaml.reader.StreamReader, org.yaml.snakeyaml.LoaderOptions)'
    at com.fasterxml.jackson.dataformat.yaml.YAMLParser.<init>(YAMLParser.java:204)
    at com.fasterxml.jackson.dataformat.yaml.YAMLFactory._createParser(YAMLFactory.java:510)
    at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:414)
    at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:387)
    at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:15)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3772)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3755)
    at io.github.yamlpath.utils.SerializationUtils.unmarshalAsListOfMaps(SerializationUtils.java:62)
    at io.github.yamlpath.YamlPath.fromContent(YamlPath.java:47)
    at io.github.yamlpath.YamlPath.from(YamlPath.java:26)
augustd commented 7 months ago

Never mind. I had a conflicting version of snakeyaml erroneously included in my shaded jar.