crackthecodeabhi / kreds

A thread-safe, non-blocking, coroutine-based Redis client implementation for Kotlin
https://crackthecodeabhi.github.io/kreds
Apache License 2.0
201 stars 18 forks source link

Error with SLF4J when connecting #131

Closed Whjtee closed 10 months ago

Whjtee commented 10 months ago

i added kreds to my project and now if i try to connect it cant:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Exception in thread "main" java.lang.NoClassDefFoundError: mu/KotlinLogging at io.github.crackthecodeabhi.kreds.connection.KonnectionImplKt.<clinit>(KonnectionImpl.kt:52) at io.github.crackthecodeabhi.kreds.connection.KonnectionImpl.connect$suspendImpl(KonnectionImpl.kt:164) at io.github.crackthecodeabhi.kreds.connection.KonnectionImpl$connect$1.invokeSuspend(KonnectionImpl.kt) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:800) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:704) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:691) Caused by: java.lang.ClassNotFoundException: mu.KotlinLogging 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:520) ... 9 more

used dependencies:

implementation(kotlin("reflect"))

implementation("org.jetbrains.kotlin:kotlin-stdlib:1.9.21")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0-RC")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.5.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2")

 implementation("io.ktor:ktor-server-netty:2.3.7") {
     exclude(group = "io.netty", module = "netty-all")
}
implementation("io.netty:netty-all:4.1.104.Final")
implementation("io.ktor:ktor-network:$ktorVersion")

implementation("org.jetbrains.exposed:exposed-core:0.45.0")
implementation("org.jetbrains.exposed:exposed-jdbc:0.45.0")
implementation("org.jetbrains.exposed:exposed-kotlin-datetime:0.45.0")

implementation("io.github.crackthecodeabhi:kreds:0.9.1")