Hello folks, :wave::skin-tone-4: I've recently st...
# koin
h
Hello folks, 👋🏽 I've recently start planning the upgrade of Ktor 2.x to Ktor 3.x and I noticed that we have the opened issue https://github.com/InsertKoinIO/koin/issues/1716 and I thought that confirming here it would be better than raising a new issue. I noticed that during the migration, we are receiving exceptions such as the below. Are you able to confirm that these issues should be fixed once the Ticket is resolved?
Copy code
java.lang.NoClassDefFoundError: io/ktor/server/routing/RoutingKt
        at org.koin.ktor.ext.RouteExtKt.getKoin(RouteExt.kt:74)
Thanks in advance for the help here.
o
I had something similar at some point with Coil. I migrated to Ktor 3 but kept Coil depends on
coil-network-ktor2
which led to a
NoClassDefFoundError
. Would it be possible that you depends on a Koin module relying on ktor2 that should be updated to depend on ktor3 ?
h
It is a very small service, and I don't have many modules being loaded. I only have a single module that depends on Ktor, and that's the one being upgraded to Ktor 3.
I reckon the issue seems to be related to the Opened issue indeed. I'm afraid I won't be able to complete the migration until Koin supports Ktor 3. I will keep watching it and hopefully once it is released I might be able to re-test. I was able to successfully test out the changes with Ktor 2 and Koin 4, and works as expected. But with Ktor 3. The error
java.lang.ClassNotFoundException: io.ktor.server.routing.RoutingKt
prevent dependencies from being injected successfully. 😞
Feels like the issue is sort of the same. https://github.com/InsertKoinIO/koin/issues/2008
o
h
Yep. 100% that one. =)
Thanks for all the assistance BTW.