Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoClassDefFoundError on AI call #797

Open
Atternatt opened this issue Dec 5, 2024 · 0 comments
Open

NoClassDefFoundError on AI call #797

Atternatt opened this issue Dec 5, 2024 · 0 comments

Comments

@Atternatt
Copy link

I'm using the version 0.0.5-alpha.119, I just created a service that calls:

suspend fun getRandomTransactions(): Either<String, Transaction> = either {
        arrow.core.raise.catch({
            AI(
                "Return me a random IN_OUT transaction that can be either " +
                    "positive or negative ",
            )
        }, { raise("Error!") })
    }

And right after calling it I receive

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: io/ktor/client/plugins/contentnegotiation/ContentNegotiation
        at com.xebia.functional.xef.ConfigKt$OpenAI$clientConfig$1.invoke(Config.kt:56)
        at com.xebia.functional.xef.ConfigKt$OpenAI$clientConfig$1.invoke(Config.kt:55)
        at io.ktor.client.HttpClientKt.HttpClient(HttpClient.kt:611)
        at io.ktor.client.HttpClientJvmKt.HttpClient(HttpClientJvm.kt:23)
        at com.xebia.functional.xef.ConfigKt.OpenAI(Config.kt:76)
        at com.xebia.functional.xef.ConfigKt.OpenAI$default(Config.kt:45)
        at com.xebia.functional.xef.AIConfig.<init>(AIConfig.kt:12)
        at com.m2f.bire.server.service.TransactionsRpcService.getRandomTransactions(TransactionsRpcService.kt:42)
        at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.lang.reflect.Method.invoke(Method.java:580)
        at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
        at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113)
        at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
        at kotlin.reflect.full.KCallables.callSuspend(KCallables.kt:56)
        at kotlinx.rpc.krpc.server.internal.RPCServerService$handleCall$requestJob$1$result$value$1.invokeSuspend(RPCServerService.kt:180)
        at kotlinx.rpc.krpc.server.internal.RPCServerService$handleCall$requestJob$1$result$value$1.invoke(RPCServerService.kt)
        at kotlinx.rpc.krpc.server.internal.RPCServerService$handleCall$requestJob$1$result$value$1.invoke(RPCServerService.kt)
        at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:42)
        at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:164)
        at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
        at kotlinx.rpc.krpc.StreamScopeKt.callScoped(StreamScope.kt:134)
        at kotlinx.rpc.krpc.server.internal.RPCServerService$handleCall$requestJob$1.invokeSuspend(RPCServerService.kt:179)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:832)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)
        Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.BroadcastFrameClock@54ce4d63, StandaloneCoroutine{Cancelling}@25e8bce0, Dispatchers.Main]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant