SpringBoot 应用程序不运行异常

马修斯·梅洛

我是 Spring Boot 的新手,所以我正在尝试创建一个简单的 Crud,但是当我运行我的应用程序时,我不断收到这个错误

 .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.3.4.RELEASE)

2022-05-24 00:02:13.910  INFO 10611 --- [           main] c.m.crudworkers.CrudWorkersApplication   : Starting CrudWorkersApplication on kalheeso-Aspire-A515-54G with PID 10611 (/home/kalheeso/workspace_sts/crud_workers/target/classes started by kalheeso in /home/kalheeso/workspace_sts/crud_workers)
2022-05-24 00:02:13.913  INFO 10611 --- [           main] c.m.crudworkers.CrudWorkersApplication   : No active profile set, falling back to default profiles: default
2022-05-24 00:02:14.033  WARN 10611 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/home/kalheeso/workspace_sts/crud_workers/target/classes/com/matheusmelo/crudworkers/CrudWorkersApplication.class]; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [/home/kalheeso/workspace_sts/crud_workers/target/classes/com/matheusmelo/crudworkers/CrudWorkersApplication.class]; nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 61
2022-05-24 00:02:14.048 ERROR 10611 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/home/kalheeso/workspace_sts/crud_workers/target/classes/com/matheusmelo/crudworkers/CrudWorkersApplication.class]; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [/home/kalheeso/workspace_sts/crud_workers/target/classes/com/matheusmelo/crudworkers/CrudWorkersApplication.class]; nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 61
    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:452) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:315) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:276) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:132) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:296) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:250) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:207) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:175) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:319) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:280) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:96) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:707) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:533) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.4.RELEASE.jar:2.3.4.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) ~[spring-boot-2.3.4.RELEASE.jar:2.3.4.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) ~[spring-boot-2.3.4.RELEASE.jar:2.3.4.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.3.4.RELEASE.jar:2.3.4.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.3.4.RELEASE.jar:2.3.4.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) ~[spring-boot-2.3.4.RELEASE.jar:2.3.4.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.3.4.RELEASE.jar:2.3.4.RELEASE]
    at com.matheusmelo.crudworkers.CrudWorkersApplication.main(CrudWorkersApplication.java:10) ~[classes/:na]
Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [/home/kalheeso/workspace_sts/crud_workers/target/classes/com/matheusmelo/crudworkers/CrudWorkersApplication.class]; nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 61
    at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:60) ~[spring-core-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:49) ~[spring-core-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103) ~[spring-core-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:123) ~[spring-core-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:429) ~[spring-context-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    ... 21 common frames omitted
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61
    at org.springframework.asm.ClassReader.<init>(ClassReader.java:196) ~[spring-core-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.asm.ClassReader.<init>(ClassReader.java:177) ~[spring-core-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.asm.ClassReader.<init>(ClassReader.java:163) ~[spring-core-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.asm.ClassReader.<init>(ClassReader.java:284) ~[spring-core-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:57) ~[spring-core-5.2.9.RELEASE.jar:5.2.9.RELEASE]
    ... 25 common frames omitted

我想它一定是一些版本问题,但我不知道如何解决它。我在 ubuntu 上使用 STS 创建了项目,主要使用默认选项

班加莱

看起来你有java版本问题。你能检查一下你正在使用的java版本吗?

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

SpringBoot应用程序。运行测试

无法运行SpringBoot应用程序

在Springboot应用程序中使用monad捕获异常

在SpringBoot应用程序中使用@RolesAllowed的异常

演示Springboot应用程序连接到Postgres数据库引发运行时嵌套异常

SpringBoot devtools如何检测应用程序的运行环境?

无法运行 springboot 应用程序,得到 OptimisticLockException

运行springboot应用程序时出现错误

从运行SpringBoot应用程序的Pod连接到GC存储

使用全局异常处理程序在SpringBoot应用程序中处理BindException

如何在运行测试之前运行应用程序 (gradle/kotlin/springboot)

如何在我的应用程序中运行特定的SpringBoot CommandLineRunner运行器?

如何在springboot应用程序中全局处理数据库连接异常?

简单的 SpringBoot 应用程序在 Eclipse 中工作,从终端抛出异常

springboot 应用程序中的 Nio2Endpoint.Nio2SocketWrapper.getSslSupport 异常

Kubernetes,简单的应用程序SpringBoot OOMKilled

Springboot应用程序无法在DB重启

SpringFox Swagger与Springboot应用程序集成

SpringBoot单页应用程序并发

在springboot应用程序启动线程

SpringBoot应用程序退出时间

过滤到Scala springboot应用程序

使用SpringBoot,Spring的MVC和Maven WEB-INF不包含在Web应用程序

不设置数据源就无法启动springboot应用程序

对于模块化项目,从IntelliJ IDEA运行SpringBoot应用程序失败

如何从Java IDE为专业开发人员(IntelliJ IDEA)运行SpringBoot应用程序

无法在WebSphere上运行的SpringBoot应用程序中找到Webjars

如何在运行时更新SpringBoot应用程序的配置而不重载整个ApplicationContext

在所需的端口上运行springboot应用程序的maven命令是什么