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

启动项目报错,Caused by: java.lang.ClassNotFoundException: kotlin.enums.EnumEntriesKt #926

Closed
ityaquan opened this issue Aug 26, 2024 · 3 comments
Assignees
Labels
无效 无效、已被修复或不属实的 疑问 一个疑问 陈旧 陈旧且未更新的议题

Comments

@ityaquan
Copy link

是否会提供贡献?

版本号

4.6.0

附加版本

No response

涉及的编程语言

Java

项目构建工具

Maven

涉及的组件库

QQ机器人

问题描述

启动项目时报错


org.springframework.boot
spring-boot-starter

    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>love.forte.simbot</groupId>
        <artifactId>simbot-core-spring-boot-starter</artifactId>
        <version>4.6.0</version>
    </dependency>
    <dependency>
        <groupId>love.forte.simbot.component</groupId>
        <artifactId>simbot-component-qq-guild-core-jvm</artifactId>
        <version>4.0.0</version>
    </dependency>
    <dependency>
        <groupId>io.ktor</groupId>
        <artifactId>ktor-client-java-jvm</artifactId>
        <version>2.3.11</version>
        <scope>runtime</scope>
    </dependency>
</dependencies>

复现方式

启动项目时报错

相关日志

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springApplicationConfigurationProperties' defined in love.forte.simbot.spring.configuration.SimbotSpringPropertiesConfiguration: Failed to instantiate [love.forte.simbot.spring.common.application.SpringApplicationConfigurationProperties]: Factory method 'springApplicationConfigurationProperties' threw exception with message: kotlin/enums/EnumEntriesKt
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:657) ~[spring-beans-6.0.4.jar:6.0.4]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:491) ~[spring-beans-6.0.4.jar:6.0.4]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1324) ~[spring-beans-6.0.4.jar:6.0.4]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) ~[spring-beans-6.0.4.jar:6.0.4]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:561) ~[spring-beans-6.0.4.jar:6.0.4]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[spring-beans-6.0.4.jar:6.0.4]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.4.jar:6.0.4]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.4.jar:6.0.4]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.4.jar:6.0.4]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.4.jar:6.0.4]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:961) ~[spring-beans-6.0.4.jar:6.0.4]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:915) ~[spring-context-6.0.4.jar:6.0.4]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:584) ~[spring-context-6.0.4.jar:6.0.4]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) ~[spring-boot-3.0.2.jar:3.0.2]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432) ~[spring-boot-3.0.2.jar:3.0.2]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-3.0.2.jar:3.0.2]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) ~[spring-boot-3.0.2.jar:3.0.2]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) ~[spring-boot-3.0.2.jar:3.0.2]
	at com.duck.duckbot.DuckBotApplication.main(DuckBotApplication.java:15) ~[classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [love.forte.simbot.spring.common.application.SpringApplicationConfigurationProperties]: Factory method 'springApplicationConfigurationProperties' threw exception with message: kotlin/enums/EnumEntriesKt
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:171) ~[spring-beans-6.0.4.jar:6.0.4]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-6.0.4.jar:6.0.4]
	... 18 common frames omitted
Caused by: java.lang.NoClassDefFoundError: kotlin/enums/EnumEntriesKt
	at love.forte.simbot.spring.common.application.BotConfigResourceLoadFailurePolicy.<clinit>(SpringApplicationConfigurationProperties.kt:240) ~[simbot-core-spring-boot-starter-common-4.6.0.jar:na]
	at love.forte.simbot.spring.common.application.SpringApplicationConfigurationProperties$BotProperties.<init>(SpringApplicationConfigurationProperties.kt:70) ~[simbot-core-spring-boot-starter-common-4.6.0.jar:na]
	at love.forte.simbot.spring.common.application.SpringApplicationConfigurationProperties.<init>(SpringApplicationConfigurationProperties.kt:41) ~[simbot-core-spring-boot-starter-common-4.6.0.jar:na]
	at love.forte.simbot.spring.configuration.SimbotSpringPropertiesConfiguration.springApplicationConfigurationProperties(SimbotSpringPropertiesConfiguration.kt:46) ~[simbot-core-spring-boot-starter-4.6.0.jar:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:139) ~[spring-beans-6.0.4.jar:6.0.4]
	... 19 common frames omitted
Caused by: java.lang.ClassNotFoundException: kotlin.enums.EnumEntriesKt
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[na:na]
	... 28 common frames omitted

其他补充

@ityaquan ityaquan added the bug? 疑似为bug、存在普遍性问题、待确认 label Aug 26, 2024
@ForliyScarlet ForliyScarlet added the 等待确认 等待负责人员的确认 label Aug 26, 2024
@ForteScarlet
Copy link
Member

ForteScarlet commented Aug 26, 2024

可参考 https://github.com/orgs/simple-robot/discussions/183 ,不过目前Kotlin版本 kotlin.version 推荐配置为 2.0.0 或以上

@ForteScarlet ForteScarlet added 等待反馈 等待发起者的反馈 疑问 一个疑问 and removed bug? 疑似为bug、存在普遍性问题、待确认 等待确认 等待负责人员的确认 labels Aug 26, 2024
@ForliyScarlet
Copy link
Member

此issue已经在「等待反馈」状态下5日未应答。如果在「陈旧」状态下逾期2日将会被视为无效过期并关闭。

@ForliyScarlet ForliyScarlet added the 陈旧 陈旧且未更新的议题 label Sep 1, 2024
@ForliyScarlet
Copy link
Member

此issue已经在「陈旧」状态下逾期2日未应答, 视为无效过期并关闭。

@ForliyScarlet ForliyScarlet added the 无效 无效、已被修复或不属实的 label Sep 4, 2024
@ForliyScarlet ForliyScarlet removed the 等待反馈 等待发起者的反馈 label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
无效 无效、已被修复或不属实的 疑问 一个疑问 陈旧 陈旧且未更新的议题
Projects
None yet
Development

No branches or pull requests

3 participants