current version jackson-databind-2.9.10.1.jar
need to upgrade jackson-databind-2.11.1.jar
I could not find ToStringSerializerBase class in new version of jackson updated jar
org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fasterxml.jackson.datatype.jsr310.JavaTimeModule]: Unresolvable class definition; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ser/std/ToStringSerializerBase
internal dependencies i found
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.10.5</version>
</dependency>
Any idea how can I solve this?
I had a similar error with Spring vs. Jackson, and solved it, see below.
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.9</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.9</version>
</dependency>
I ran mvn dependency:tree|grep jackson
and saw clashing versions:
[INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.11.4:compile
[INFO] | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.11.4:compile
[INFO] | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.4:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.9:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.11.4:compile
[INFO] \- com.fasterxml.jackson.core:jackson-core:jar:2.9.9:compile
pom.xml
to match Spring's one and all worked smoothly: <dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.11.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.11.4</version>
</dependency>
Hope this helps. Enjoy!
ToStringSerializerBase is present in version 2.12 of jackson-databind
POM dependecy
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.0</version>
</dependency>
ToStringSerializerBase is present in Jar
(base) rohiagra-mac:faw-qa-api rohiagra$ jar -tvf target/faw-qa-api-1.0-SNAPSHOT.jar | grep "ToStringSerializerBase"
3347 Sun Nov 29 14:46:22 IST 2020 com/fasterxml/jackson/databind/ser/std/ToStringSerializerBase.class
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