Closed HeilantG closed 2 years ago
at love.forte.simboot.autoconfigure.DefaultSimbootAppRunner.run(SimbootAppRunnerConfiguration.kt:49) ~[simboot-core-spring-boot-starter-3.0.0.preview.7.0.jar:na]
环境中的 simboot-core-spring-boot-starter
似乎还是 v3.0.0.preview.7.0
版本,确认是否手动导入了此版本的依赖。如果有,尝试更正版本到 v3.0.0.preview.8.0
。
以确认版本为8.0 出现新的错误 , bot无法启动
An attempt was made to call a method that does not exist. The attempt was made from the following location:
io.ktor.client.utils.CoroutineDispatcherUtilsKt.clientDispatcher(CoroutineDispatcherUtils.kt:22)
The following method did not exist:
'kotlinx.coroutines.CoroutineDispatcher kotlinx.coroutines.CoroutineDispatcher.limitedParallelism(int)'
The calling method's class, io.ktor.client.utils.CoroutineDispatcherUtilsKt, was loaded from the following location:
jar:file:/C:/Users/HeilantG/.m2/repository/io/ktor/ktor-client-core-jvm/2.0.0/ktor-client-core-jvm-2.0.0.jar!/io/ktor/client/utils/CoroutineDispatcherUtilsKt.class
The called method's class, kotlinx.coroutines.CoroutineDispatcher, is available from the following locations:
jar:file:/C:/Users/HeilantG/.m2/repository/org/jetbrains/kotlinx/kotlinx-coroutines-core-jvm/1.5.2/kotlinx-coroutines-core-jvm-1.5.2.jar!/kotlinx/coroutines/CoroutineDispatcher.class
The called method's class hierarchy was loaded from the following locations:
kotlinx.coroutines.CoroutineDispatcher: file:/C:/Users/HeilantG/.m2/repository/org/jetbrains/kotlinx/kotlinx-coroutines-core-jvm/1.5.2/kotlinx-coroutines-core-jvm-1.5.2.jar
kotlin.coroutines.AbstractCoroutineContextElement: file:/C:/Users/HeilantG/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.6.10/kotlin-stdlib-1.6.10.jar
Action:
Correct the classpath of your application so that it contains compatible versions of the classes io.ktor.client.utils.CoroutineDispatcherUtilsKt and kotlinx.coroutines.CoroutineDispatcher
进程已结束,退出代码1
临时解决办法:
<properties>
<java.version>1.8</java.version>
<kotlinx-coroutines.version>1.6.1</kotlinx-coroutines.version>
</properties>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core-jvm</artifactId>
<version>${kotlinx-coroutines.version}</version>
</dependency>
<dependency>
<groupId>love.forte.simbot.boot</groupId>
<artifactId>simboot-core-spring-boot-starter</artifactId>
<version>3.0.0.preview.8.0</version>
<exclusions>
<exclusion>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core-jvm</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>love.forte.simbot.component</groupId>
<artifactId>simbot-component-kaiheila-boot</artifactId>
<version>3.0.0.0.preview.3.0</version>
<exclusions>
<exclusion>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core-jvm</artifactId>
</exclusion>
</exclusions>
</dependency>
.....
</dependencies>
但是这只能保证正常启动,无法监听事件,原因参考 #18
版本:
问题描述: 无法正常启动开黑啦组件
启动问题: