Kotlin 1.5 NoSuchMethodError: DurationKt.getMinutes(int)
See original GitHub issueI’m using kord-core 0.7.0-M2 and I get this at startup.
Kotlin 1.5 made changes to the duration api
Duration API changes including using a Long value for the internal representation and providing new properties for retrieving a duration as a Long value.
java.lang.NoSuchMethodError: 'double kotlin.time.DurationKt.getMinutes(int)'
at com.gitlab.kordlib.rest.ratelimit.AbstractRateLimiter.<init>(AbstractRateLimiter.kt:22)
at com.gitlab.kordlib.rest.ratelimit.ExclusionRequestRateLimiter.<init>(ExclusionRequestRateLimiter.kt:23)
at com.gitlab.kordlib.rest.ratelimit.ExclusionRequestRateLimiter.<init>(ExclusionRequestRateLimiter.kt:23)
at com.gitlab.kordlib.core.builder.kord.KordBuilder$handlerBuilder$1.invoke(KordBuilder.kt:70)
at com.gitlab.kordlib.core.builder.kord.KordBuilder$handlerBuilder$1.invoke(KordBuilder.kt:57)
at com.gitlab.kordlib.core.builder.kord.KordBuilder.build(KordBuilder.kt:222)
at com.gitlab.kordlib.core.builder.kord.KordBuilder$build$1.invokeSuspend(KordBuilder.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:188)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:144)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:90)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:188)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:144)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:90)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:188)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:144)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:90)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at Discord_covid_bot_main.<init>(discord-covid-bot.main.kts:313)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top Results From Across the Web
NoSuchMethodError when using kotlin.time.Duration as parameter ...
NoSuchMethodError when using kotlin.time.Duration as parameter (1.5.0-RC) ... The expected behaviour is to call the operator function which exists in kotlinx.
Read more >kotlin.time.DurationKt.toDuration with version 5.3.1 ... - GitHub
Exception java.lang.NoSuchMethodError: kotlin.time.DurationKt.toDuration(JLkotlin/time/DurationUnit;)J at io.kotest.engine.spec.interceptor.
Read more >NoClassDefFoundError for Duration.seconds - kotlin
I tried to update from kotlin 1.4 to 1.5 ...
Read more >What's new in Kotlin 1.5.0
Kotlin 1.5.0 introduces new language features, stable IR-based JVM compiler backend, performance improvements, and evolutionary changes such ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This got merged into master no changed are required anymore
This is a bug related to Kotlin 1.5, which I am currently working on. Due to binary changes in the 1.5 stdlib and some dependencies using 1.5 has some funny odities
Schlaubi’s stupid guide to use kord 1.5 (Every change you need I found so far)
kotlin-1.5
If you use kotlinx.serialization use(Fixed by #279)1.0.0
don’t use anything newerHas been merged to 0.7.x re-open if you’d like further discussion use the
0.7.x-SNAPSHOT
artifact