by @kodeazy
Application run failed while updating snakeyaml from 1.32 to 2.0
I was trying to fix my snyke vulnerabilities
in my build.gradle
by updating snakeyaml
from 1.32
to 2.0
Got below error
2330 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
java.lang.NoSuchMethodError: org.yaml.snakeyaml.Yaml.<init>()V
at org.springframework.boot.env.OriginTrackedYamlLoader.createYaml(OriginTrackedYamlLoader.java:80)~[spring-boot-2.6.12jar:2.6.12]
t org.springframework.boot.env.OriginTrackedYamlLoader.createYaml(OriginTrackedYamlLoader.java:75)~[spring-boot-2.6.12jar:2.6.12]
To resolve the error follow below steps
Check the current SpringBoot version in build.gradle
file
My current springBoot version in build.gradle
file is 2.6.12
.
Updating the SpringBoot version resolves the problem
To use Spring Boot 2.x
with SnakeYAML 2.0
we have to upgrade to Spring Boot 2.7.10
.