cssxsh / mirai-openai-plugin

Mirai Console OpenAI ChatBot 插件
GNU Affero General Public License v3.0
130 stars 14 forks source link

java.lang.NoSuchMethodError: net.mamoe.mirai.console.plugin.jvm.AbstractJvmPlugin.access$services #21

Closed MagicOrangeKKSK closed 1 year ago

MagicOrangeKKSK commented 1 year ago

mirai版本2.13.4,插件版本1.3.4

==================================[ Mirai consosle 2.13.4 ]===================================
 __       __ __                   __  ______                                      __
|  \     /  \  \                 |  \/      \                                    |  \
| ▓▓\   /  ▓▓\▓▓ ______   ______  \▓▓  ▓▓▓▓▓▓\ ______  _______   _______  ______ | ▓▓ ______
| ▓▓▓\ /  ▓▓▓  \/      \ |      \|  \ ▓▓   \▓▓/      \|       \ /       \/      \| ▓▓/      \
| ▓▓▓▓\  ▓▓▓▓ ▓▓  ▓▓▓▓▓▓\ \▓▓▓▓▓▓\ ▓▓ ▓▓     |  ▓▓▓▓▓▓\ ▓▓▓▓▓▓▓\  ▓▓▓▓▓▓▓  ▓▓▓▓▓▓\ ▓▓  ▓▓▓▓▓▓\
| ▓▓\▓▓ ▓▓ ▓▓ ▓▓ ▓▓   \▓▓/      ▓▓ ▓▓ ▓▓   __| ▓▓  | ▓▓ ▓▓  | ▓▓\▓▓    \| ▓▓  | ▓▓ ▓▓ ▓▓    ▓▓
| ▓▓ \▓▓▓| ▓▓ ▓▓ ▓▓     |  ▓▓▓▓▓▓▓ ▓▓ ▓▓__/  \ ▓▓__/ ▓▓ ▓▓  | ▓▓_\▓▓▓▓▓▓\ ▓▓__/ ▓▓ ▓▓ ▓▓▓▓▓▓▓▓
| ▓▓  \▓ | ▓▓ ▓▓ ▓▓      \▓▓    ▓▓ ▓▓\▓▓    ▓▓\▓▓    ▓▓ ▓▓  | ▓▓       ▓▓\▓▓    ▓▓ ▓▓\▓▓     \
 \▓▓      \▓▓\▓▓\▓▓       \▓▓▓▓▓▓▓\▓▓ \▓▓▓▓▓▓  \▓▓▓▓▓▓ \▓▓   \▓▓\▓▓▓▓▓▓▓  \▓▓▓▓▓▓ \▓▓ \▓▓▓▓▓▓▓

2023-03-23 10:17:51 I/main: Backend: version 2.13.4, built on 2023-01-21 21:19:40.
2023-03-23 10:17:51 I/main: Frontend Terminal: version 2.13.4, provided by Mamoe Technologies
2023-03-23 10:17:51 I/main: Welcome to visit https://mirai.mamoe.net/
2023-03-23 10:17:51 W/stderr: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
2023-03-23 10:17:51 W/stderr: SLF4J: Defaulting to no-operation (NOP) logger implementation
2023-03-23 10:17:51 W/stderr: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2023-03-23 10:17:51 E/main: Failed to init MiraiConsole.
net.mamoe.mirai.console.internal.util.ServiceLoadException: Could not load service xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin.
    at net.mamoe.mirai.console.internal.util.PluginServiceHelper.loadService(PluginServiceHelper.kt:60)
    at net.mamoe.mirai.console.internal.util.PluginServiceHelper.loadAllServices(PluginServiceHelper.kt:42)
    at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl$extractPlugins$findAllInstances$2.invoke(BuiltInJvmPluginLoaderImpl.kt:197)
    at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl$extractPlugins$findAllInstances$2.invoke(BuiltInJvmPluginLoaderImpl.kt:192)
    at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
    at kotlin.sequences.FlatteningSequence$iterator$1.ensureItemIterator(Sequences.kt:314)
    at kotlin.sequences.FlatteningSequence$iterator$1.hasNext(Sequences.kt:303)
    at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:214)
    at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:214)
    at kotlin.sequences.FlatteningSequence$iterator$1.ensureItemIterator(Sequences.kt:307)
    at kotlin.sequences.FlatteningSequence$iterator$1.hasNext(Sequences.kt:303)
    at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:787)
    at kotlin.sequences.SequencesKt___SequencesKt.toSet(_Sequences.kt:828)
    at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.extractPlugins(BuiltInJvmPluginLoaderImpl.kt:218)
    at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.listPlugins(BuiltInJvmPluginLoaderImpl.kt:67)
    at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.listPlugins(JvmPluginLoader.kt)
    at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.listAndSortAllPlugins(PluginManagerImpl.kt:189)
    at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.findAndSortAllPluginsUsingBuiltInLoaders(PluginManagerImpl.kt:135)
    at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.loadAllPluginsUsingBuiltInLoaders$mirai_console(PluginManagerImpl.kt:145)
    at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:279)
    at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:508)
    at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:177)
    at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:176)
    at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:54)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.itxtech.mcl.Utility.bootJars(Utility.java:86)
    at org.itxtech.mcl.Utility.bootJars(Utility.java:76)
    at org.itxtech.mcl.Utility.bootMirai(Utility.java:98)
    at org.itxtech.mcl.module.builtin.Boot.boot(Boot.java:113)
    at org.itxtech.mcl.module.ModuleManager.phaseBoot(ModuleManager.java:123)
    at org.itxtech.mcl.Loader.lambda$start$4(Loader.java:196)
    at org.itxtech.mcl.Loader.tryCatching(Loader.java:151)
    at org.itxtech.mcl.Loader.start(Loader.java:196)
    at org.itxtech.mcl.Loader.main(Loader.java:84)
Caused by: java.lang.NoSuchMethodError: net.mamoe.mirai.console.plugin.jvm.AbstractJvmPlugin.access$services(Lnet/mamoe/mirai/console/plugin/jvm/AbstractJvmPlugin;Lkotlin/reflect/KClass;)Lkotlin/Lazy;
    at mirai-openai-plugin-1.3.4.mirai2.jar//xyz.cssxsh.mirai.openai.MiraiOpenAiPlugin.<clinit>(MiraiOpenAiPlugin.kt:115)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:398)
    at net.mamoe.mirai.console.internal.util.PluginServiceHelper.loadService(PluginServiceHelper.kt:51)
    ... 36 more

尝试过使用指令下载也试过直接下载后丢进plugins 均出现这个问题

cssxsh commented 1 year ago

你需要升级到 2.14

MagicOrangeKKSK commented 1 year ago

你需要升级到 2.14

好消息:更新到2.14可以用了 坏消息:我好像需要充钱了 xyz.cssxsh.openai.OpenAiException: You exceeded your current quota, please check your plan and billing details.