In my spring boot application, I am using snakeyaml to parse a YAML file. I get the following error though when using the library:
java.lang.NoSuchMethodError: org.yaml.snakeyaml.nodes.ScalarNode.getStyle()Ljava/lang/Character;
I am using the following maven dependency:
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.21</version>
</dependency>
Does anyone have a hint for resolving this error?
Edit:
The error seems to occur when parsing spring's application.yml:
server:
port: 8084
You need to update to SnakeYml 1.23, they fixed the incompatible API change introduced in 1.20.
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.23</version>
</dependency>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With