java.lang.NoClassDefFoundError: kotlin/jvm/JvmInline
See original GitHub issueI 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]
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:12 (6 by maintainers)
Top Results From Across the Web
NoClassDefFoundError: kotlin/jvm/JvmInline - Stack Overflow
I'm new to Kotlin. I appreciate her help. I am building a rest to get a list of people: @RestController @RequestMapping(Constants.
Read more >NoClassDefFoundError: kotlin.jvm.internal.KTypeBase caused ...
KT-41173 Maven: java.lang.NoClassDefFoundError: kotlin/jvm/internal/KTypeBase in spring-project. 3. Just upgraded my codebase to 1.4.0-rc from 1.3-M3 and am ...
Read more >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...
Read more >ClassNotFoundException: kotlin.jvm.internal.KotlinClass
Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/jvm/internal/KotlinClass at com.fasterxml.jackson.module.kotlin.
Read more >How can I fix random Kotlin exceptions when using the Java ...
NoClassDefFoundError : Could not initialize class java.lang.RuntimeException: java.lang.NoSuchMethodError: kotlin.jvm.internal.FunctionReferenceImpl.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.