You are currently viewing Getting ClassCastException in KClasses.getMemberProperties() but only on Amazon’s Corretto JVM – any ideas?

Getting ClassCastException in KClasses.getMemberProperties() but only on Amazon’s Corretto JVM – any ideas?

I’m getting the following exception when I try running my app on Amazon Corretto (on Elastic Beanstalk or locally), I don’t get it when I use openjdk’s JVM:

java.lang.ClassCastException: class kotlin.jvm.internal.ClassReference cannot be cast to class kotlin.reflect.jvm.internal.KClassImpl (kotlin.jvm.internal.ClassReference and kotlin.reflect.jvm.internal.KClassImpl are in unnamed module of loader 'app') at kotlin.reflect.full.KClasses.getMemberProperties(KClasses.kt:148) 

Does anyone have any idea what the cause might be? Seems like it might be internal to Kotlin’s reflection library.

submitted by /u/sanity
[link] [comments]