JakeWharton/retrofit2-kotlinx-serialization-converter

NoClassDefFoundError exception occurred for latest Kotlin version

lveay2 opened this issue · 3 comments

We had this NoClassDefFoundError exception occurred in running timing when deserialize the JSON response from remote API.

Any thoughts?

Here is the pom details:

        <kotlin.version>1.3.30-eap-125</kotlin.version>
        <kotlinx-coroutines-core.verion>1.1.1</kotlinx-coroutines-core.verion>
        <kotlin-serialization.version>0.11.0-1.3.30-eap-125</kotlin-serialization.version>
[04-04-19 13:29:02.237] [3ca80f36b487d712_MOBORCH-1JY8J7L13SWEOLSXU26QS32BPO0_ANDROIDNEG] ERROR  c.p.m.o.r.s.h.HotelRetailDetailsServiceImpl - java.lang.NoClassDefFoundError: kotlinx/serialization/ResolvingKt
java.lang.NoClassDefFoundError: kotlinx/serialization/ResolvingKt
	at com.jakewharton.retrofit2.converter.kotlinx.serialization.Factory.responseBodyConverter(Factory.kt:23) ~[retrofit2-kotlinx-serialization-converter-0.3.0.jar:na]
	at retrofit2.Retrofit.nextResponseBodyConverter(Retrofit.java:328) ~[retrofit-2.5.0.jar:na]
	at retrofit2.Retrofit.responseBodyConverter(Retrofit.java:311) ~[retrofit-2.5.0.jar:na]
	at retrofit2.HttpServiceMethod.createResponseConverter(HttpServiceMethod.java:68) ~[retrofit-2.5.0.jar:na]
	at retrofit2.HttpServiceMethod.parseAnnotations(HttpServiceMethod.java:46) ~[retrofit-2.5.0.jar:na]
	at retrofit2.ServiceMethod.parseAnnotations(ServiceMethod.java:36) ~[retrofit-2.5.0.jar:na]
	at retrofit2.Retrofit.loadServiceMethod(Retrofit.java:168) ~[retrofit-2.5.0.jar:na]
	at retrofit2.Retrofit$1.invoke(Retrofit.java:147) ~[retrofit-2.5.0.jar:na]
	at com.sun.proxy.$Proxy150.retail(Unknown Source) ~[na:na]
	at com.priceline.mobile.orchestration.remote.service.hotels.HotelRetailDetailsServiceImpl.retail(HotelRetailDetailsServiceImpl.kt:31) ~[classes/:na]

Yes they renamed a file which contained a top-level function that this library uses. They can maintain binary compatibility by specifying @file:JvmName("ResolvingKt") if you want to file an issue on the project. Otherwise we'll just have to wait for 0.11.0 to be released before we can release an update.

0.4.0 fixes this issue, right?

Yes. Thanks! I actually thought I had already closed this.