I am trying to upgrade an existing application using spring boot version 2.7.0. with java 21 and getting below exception while running the application.
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 [xxxApplication.class]; nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 65\r\n\tat o.s.c.a.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:457)\r\n\tat o.s.c.a.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:316)\r\n\tat o.s.c.a.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:276)\r\n\tat o.s.c.a.C...\r\n"}
Please suggest the solution
Comment From: bclozel
Please don't create duplicate issues.
https://github.com/spring-projects/spring-boot/issues/41357