martmists
05/22/2025, 3:15 PMMay 22 17:13:36 preon bash[49023]: Exception in thread "DefaultDispatcher-worker-25" java.lang.NoClassDefFoundError: kotlinx/coroutines/CoroutineExceptionHandlerKt
May 22 17:13:36 preon bash[49023]: at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:126)
May 22 17:13:36 preon bash[49023]: at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
May 22 17:13:36 preon bash[49023]: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
May 22 17:13:36 preon bash[49023]: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:820)
May 22 17:13:36 preon bash[49023]: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
May 22 17:13:36 preon bash[49023]: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)
May 22 17:13:36 preon bash[49023]: Caused by: java.lang.ClassNotFoundException: kotlinx.coroutines.CoroutineExceptionHandlerKt
May 22 17:13:36 preon bash[49023]: ... 6 more
How do I fix this? I have kotlinx-coroutines-core in my shadowJar.Sam
05/22/2025, 3:17 PMmartmists
05/22/2025, 3:17 PMSam
05/22/2025, 3:19 PMSam
05/22/2025, 3:21 PMNoClassDefFoundError
can actually be caused by an exception during static initialization of a class (i.e. the class does exist, but couldn't be loaded due to an error). It's worth looking closely at the whole stacktrace for any signs of that.Daniel Pitts
05/23/2025, 3:31 PM