-
Notifications
You must be signed in to change notification settings - Fork 362
Open
Labels
type: bugSomething isn't workingSomething isn't working
Description
Library Version
com.expediagroup:graphql-kotlin-ktor-server
>=8.6.0
- Ktor 3.x.x
Describe the bug
The bug is almost identical to #2069;
Most of the Ktor classes fail to resolve at runtime.
The library expect to find the API of Ktor 2.x.x
Stacktrace example:
Exception in thread "main" java.lang.NoClassDefFoundError: io/ktor/server/routing/RoutingKt
at com.expediagroup.graphql.server.ktor.GraphQLRoutesKt.graphQLPostRoute(GraphQLRoutes.kt:65)
at com.expediagroup.graphql.server.ktor.GraphQLRoutesKt.graphQLPostRoute$default(GraphQLRoutes.kt:64)
at com.example.MainKt.module$lambda$2(Main.kt:30)
at io.ktor.server.routing.RoutingRoot$Plugin.install(RoutingRoot.kt:153)
at io.ktor.server.routing.RoutingRoot$Plugin.install(RoutingRoot.kt:133)
at io.ktor.server.application.ApplicationPluginKt.install(ApplicationPlugin.kt:121)
at io.ktor.server.routing.RoutingRootKt.routing(RoutingRoot.kt:181)
at com.example.MainKt.module(Main.kt:29)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Static.call(CallerImpl.kt:106)
at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:207)
at kotlin.reflect.jvm.internal.KCallableImpl.callBy(KCallableImpl.kt:112)
at io.ktor.server.engine.internal.CallableUtilsKt.callFunctionWithInjection(CallableUtils.kt:127)
at io.ktor.server.engine.internal.CallableUtilsKt.executeModuleFunction(CallableUtils.kt:40)
at io.ktor.server.engine.EmbeddedServer.launchModuleByName$lambda$32(EmbeddedServerJvm.kt:422)
at io.ktor.server.engine.EmbeddedServer.avoidingDoubleStartupFor(EmbeddedServerJvm.kt:446)
at io.ktor.server.engine.EmbeddedServer.launchModuleByName(EmbeddedServerJvm.kt:421)
at io.ktor.server.engine.EmbeddedServer.dynamicModule$lambda$26(EmbeddedServerJvm.kt:381)
at io.ktor.server.engine.EmbeddedServer.instantiateAndConfigureApplication$lambda$25(EmbeddedServerJvm.kt:371)
at io.ktor.server.engine.EmbeddedServer.avoidingDoubleStartup(EmbeddedServerJvm.kt:428)
at io.ktor.server.engine.EmbeddedServer.instantiateAndConfigureApplication(EmbeddedServerJvm.kt:370)
at io.ktor.server.engine.EmbeddedServer.createApplication(EmbeddedServerJvm.kt:171)
at io.ktor.server.engine.EmbeddedServer.start(EmbeddedServerJvm.kt:301)
at io.ktor.server.netty.EngineMain.main(EngineMain.kt:25)
Caused by: java.lang.ClassNotFoundException: io.ktor.server.routing.RoutingKt
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
... 28 more
To Reproduce
I could successfully reproduce the error using the same "Minimum Reproducible Code sample "attached in #2069 changing these versions in the libs.version.toml
ktor-version = "3.1.2"
graphql-version= "8.6.0"
Expected behavior
The Library should correctly resolve the classes of Ktor 3.x.x
Additional comment
Any version of GraphQL 9.0.0 works as expected. Since version 8.5.0 also works correctly, I would expect subsequent minor releases to work as well. Is this a bug or an intentional design choice? I couldn’t find any clarification in the documentation. Thanks for your work!
DanySK, captchafree, JajaComp, Mala1180, anton-subbotin and 2 more
Metadata
Metadata
Assignees
Labels
type: bugSomething isn't workingSomething isn't working