-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Newer spring is expecting the GsonBuilder to have method "setStrictness" in their GsonAutoConfiguration class. But as Gson is not used as an dependency rather is embbeded in the jar.
Error logs:
java.lang.NoSuchMethodError: 'com.google.gson.GsonBuilder com.google.gson.GsonBuilder.setStrictness(com.google.gson.Strictness)'
The called method's class, com.google.gson.GsonBuilder, is available from the following locations:
jar:file:/Users//.m2/repository/com/datasonnet/datasonnet-mapper/3.0.0/datasonnet-mapper-3.0.0.jar!/com/google/gson/GsonBuilder.class
jar:file:/Users//.m2/repository/com/google/code/gson/gson/2.11.0/gson-2.11.0.jar!/com/google/gson/GsonBuilder.class
Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration$StandardGsonBuilderCustomizer and com.google.gson.GsonBuilder
Expected:
The Gson should be added as an maven dependency instead of copying the class files to the jar of the datasonnet-mapper.