https://kotlinlang.org logo
Title
g

gnu

04/14/2022, 12:39 PM
Hi! I am currently migrating a project from Ktor-1.6.8/Kotlin-1.6.10 to Ktor-2.0.0/Kotlin-1.6.20 and something has changed with the ClassLoader-behavior: I cannot cast a received object from the (Apache-ActiveMQ-Artemis-)message-queue to the corresponding DTO anymore. In Ktor-1.6.8 an "OverridingClassLoader" was being used while in Ktor-2.0.0 it is "ClassLoader@AppClassLoader". How can I fix this to get rid of the ClassCastException?
e

e5l

04/14/2022, 1:42 PM
Could you log an issue? I will take a look
g

gnu

04/14/2022, 2:04 PM
e

e5l

04/14/2022, 2:04 PM
It also would be great if you could log some reproducer
g

gnu

04/14/2022, 2:13 PM
The project itself is closed source, and quick re-producing it is rather difficult. You need a message-producer-app, a message-consumer-app, the DTOs and the Artemis-message-queue itself set-up ...