Runtime Error

I don’t remember changing anything, I just started getting an error on startup. I use kord 0.15.0 and Kord-Extensions 1.9.0
Caused by: java.lang.NoClassDefFoundError: io/ktor/client/plugins/contentnegotiation/ContentNegotiation
at dev.kord.core.builder.kord.KordBuilderUtilKt.defaultConfig(KordBuilderUtil.kt:16)
at dev.kord.core.builder.kord.KordBuilderUtilKt.configure$lambda$4(KordBuilderUtil.kt:37)
at io.ktor.client.HttpClientKt.HttpClient(HttpClient.kt:42)
at dev.kord.core.builder.kord.KordBuilderUtilKt.configure(KordBuilderUtil.kt:36)
at dev.kord.core.builder.kord.BaseKordBuilder.buildBase(KordBuilder.kt:211)
at dev.kord.core.builder.kord.KordBuilder.build(KordBuilder.kt:15)
at com.kotlindiscord.kord.extensions.builders.ExtensibleBotBuilder$kordBuilder$1.invokeSuspend(ExtensibleBotBuilder.kt:1521)
at com.kotlindiscord.kord.extensions.builders.ExtensibleBotBuilder$kordBuilder$1.invoke(ExtensibleBotBuilder.kt)
at com.kotlindiscord.kord.extensions.builders.ExtensibleBotBuilder$kordBuilder$1.invoke(ExtensibleBotBuilder.kt)
at com.kotlindiscord.kord.extensions.ExtensibleBot.setup$suspendImpl(ExtensibleBot.kt:111)
at com.kotlindiscord.kord.extensions.ExtensibleBot.setup(ExtensibleBot.kt)
at com.kotlindiscord.kord.extensions.builders.ExtensibleBotBuilder.build$suspendImpl(ExtensibleBotBuilder.kt:496)
at com.kotlindiscord.kord.extensions.builders.ExtensibleBotBuilder.build(ExtensibleBotBuilder.kt)
at com.kotlindiscord.kord.extensions.ExtensibleBotKt.ExtensibleBot(ExtensibleBot.kt:545)
at com.mirage.bot.MirageBot.init(MirageBot.kt:81)
at com.mirage.bot.App$start$1.invokeSuspend(App.kt:10)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:102)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:263)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:47)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at com.mirage.bot.App.start(App.kt:9)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 2 more
Caused by: java.lang.ClassNotFoundException: io.ktor.client.plugins.contentnegotiation.ContentNegotiation
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
... 28 more
Caused by: java.lang.NoClassDefFoundError: io/ktor/client/plugins/contentnegotiation/ContentNegotiation
at dev.kord.core.builder.kord.KordBuilderUtilKt.defaultConfig(KordBuilderUtil.kt:16)
at dev.kord.core.builder.kord.KordBuilderUtilKt.configure$lambda$4(KordBuilderUtil.kt:37)
at io.ktor.client.HttpClientKt.HttpClient(HttpClient.kt:42)
at dev.kord.core.builder.kord.KordBuilderUtilKt.configure(KordBuilderUtil.kt:36)
at dev.kord.core.builder.kord.BaseKordBuilder.buildBase(KordBuilder.kt:211)
at dev.kord.core.builder.kord.KordBuilder.build(KordBuilder.kt:15)
at com.kotlindiscord.kord.extensions.builders.ExtensibleBotBuilder$kordBuilder$1.invokeSuspend(ExtensibleBotBuilder.kt:1521)
at com.kotlindiscord.kord.extensions.builders.ExtensibleBotBuilder$kordBuilder$1.invoke(ExtensibleBotBuilder.kt)
at com.kotlindiscord.kord.extensions.builders.ExtensibleBotBuilder$kordBuilder$1.invoke(ExtensibleBotBuilder.kt)
at com.kotlindiscord.kord.extensions.ExtensibleBot.setup$suspendImpl(ExtensibleBot.kt:111)
at com.kotlindiscord.kord.extensions.ExtensibleBot.setup(ExtensibleBot.kt)
at com.kotlindiscord.kord.extensions.builders.ExtensibleBotBuilder.build$suspendImpl(ExtensibleBotBuilder.kt:496)
at com.kotlindiscord.kord.extensions.builders.ExtensibleBotBuilder.build(ExtensibleBotBuilder.kt)
at com.kotlindiscord.kord.extensions.ExtensibleBotKt.ExtensibleBot(ExtensibleBot.kt:545)
at com.mirage.bot.MirageBot.init(MirageBot.kt:81)
at com.mirage.bot.App$start$1.invokeSuspend(App.kt:10)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:102)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:263)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:47)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at com.mirage.bot.App.start(App.kt:9)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 2 more
Caused by: java.lang.ClassNotFoundException: io.ktor.client.plugins.contentnegotiation.ContentNegotiation
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
... 28 more
4 Replies
gdude
gdude5mo ago
as always, if you don't need to depend on a specific Kord version, remove the Kord dependency is this in production or development?
!   Nik De Kur
! Nik De KurOP5mo ago
You told me about the first one, I removed the kord dependency a long time ago, leaving only KordEx. Just pointing out that KordEx is currently using 0.15.0. My bot is still in development.
gdude
gdude5mo ago
what gradle task do you use to run the bot?
!   Nik De Kur
! Nik De KurOP5mo ago
Okay, this gave me a suggestion, I will try to change something and write back. It seems that the problem was still in my complex boot system, I redid everything and everything started working. I apologize for creating this post.
Want results from more Discord servers?
Add your server