jackson-module-kotlin: java.lang.NoClassDefFoundError: kotlin/jvm/JvmInline
I hope to support both Java and kolitin in my project, but Jackson module kotlin is introduced into my POM. In the Java environment, this package will report errors
java.lang.NoClassDefFoundError: kotlin/jvm/JvmInline
at com.fasterxml.jackson.module.kotlin.ExtensionsKt.isUnboxableValueClass(Extensions.kt:122) ~[jackson-module-kotlin-2.13.0.jar:2.13.0]
at com.fasterxml.jackson.module.kotlin.KotlinSerializers.findSerializer(KotlinSerializers.kt:69) ~[jackson-module-kotlin-2.13.0.jar:2.13.0]
at com.fasterxml.jackson.databind.ser.BeanSerializerFactory._createSerializer2(BeanSerializerFactory.java:215) ~[jackson-databind-2.13.0.jar:2.13.0]
at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:173) ~[jackson-databind-2.13.0.jar:2.13.0]
at com.fasterxml.jackson.databind.SerializerProvider._createUntypedSerializer(SerializerProvider.java:1495) ~[jackson-databind-2.13.0.jar:2.13.0]
at com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:1443) ~[jackson-databind-2.13.0.jar:2.13.0]
at com.fasterxml.jackson.databind.SerializerProvider.findContentValueSerializer(SerializerProvider.java:777) ~[jackson-databind-2.13.0.jar:2.13.0]
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 17 (11 by maintainers)
Commits related to this issue
- Support testing with backwards compatibility for Kotlin 1.3 Closes #523 — committed to JLLeitschuh/jackson-module-kotlin by JLLeitschuh 2 years ago
- Support testing with backwards compatibility for Kotlin 1.3 Closes #523 — committed to JLLeitschuh/jackson-module-kotlin by JLLeitschuh 2 years ago
- Support testing with backwards compatibility for Kotlin 1.3 Closes #523 — committed to JLLeitschuh/jackson-module-kotlin by JLLeitschuh 2 years ago
- SBA request actuator/health threw classdefNotFoundException in jackson serializer. Had to downgrade kotlin version to 2.12.0. Bugfix thread: https://github.com/FasterXML/jackson-module-kotlin/issues/5... — committed to BitWeb/java-core-lib by deleted user 2 years ago
My guess is that it is due to a combination of
Kotlin
versions.JvmInline
is a class introduced inKotlin 1.5
. Sincejackson-module-kotlin
isKotlin 1.5
since2.13
, I think that using2.12
series will solve the problem.I’ve encountered the same thing on upgrading from Spring Boot 2.4.x to 2.6.1.
Upgrading from kotlin version 1.4.0 to 1.6.0 fixed this for me weirdly. I’ve not had time to figure out why.