question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.NoClassDefFoundError: kotlin/jvm/JvmInline

See original GitHub issue

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]

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
k163377commented, Dec 16, 2021

My guess is that it is due to a combination of Kotlin versions.

JvmInline is a class introduced in Kotlin 1.5. Since jackson-module-kotlin is Kotlin 1.5 since 2.13, I think that using 2.12 series will solve the problem.

2reactions
stepbeekiocommented, Dec 10, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found