While learning about annotations in the Spring Framework, I had this problem on my first test and couldn’t figure it out
Finally I found out that there is a mismatch between JDK and Spring version, my Spring framework version is 5.2.6 and it only supports up to JDK15 and mine is JDK16, which causes the problem
Spring Framework 5.3.x: JDK 8-17 (expected)Spring Framework 5.2.x: JDK 8-15 (expected)Spring Framework 5.1.x: JDK 8-12Spring Framework 5.0.x: JDK 8-10Spring Framework 4.3.x: JDK 6-8
I was going to download another JDK8, but suddenly I found that in File-Setting-Build, Execution... - I was able to adjust
and the problem was solved.Project bytecode version
from 16 to 15 in the Java Compiler
Error: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:\java\spring5_demo3\out\production\spring5_demo3\com\spring5\service\UserService.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 [D:\java\spring5_demo3\out\production\spring5_demo3\com\spring5\service\UserService.class]; nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 60
Read More:
- [Solved] org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class
- [Solved] JAVA Web Error: startup failed due to previous errors
- [Solved] java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]
- Java uses class array to report error Exception in thread “main” java.lang.NullPointerException solution
- [Solved] Hongmeng compiles error: Unable to find the java component with apiVersion 4.
- [Solved] Jenkins Publish to rancher Error: ERROR: Build step failed with exception java.lang.ClassCastException: class com.
- How to Solve Java Runtime (class file version 53.0)ERROR
- Java.sql.sqlexception: unable to read more data from socket
- [Solved] Hbase-shell 2.x Error: Unhandled Java exception: java.lang.IncompatibleClassChangeError: Found class jline.Terminal…
- [Solved] Java.util.linkedhashmap cannot be cast to entity class
- [Solved] Read the resources resource and convert it to file error: java.io.filenotfoundexception
- SpringBoot Startup Error: Failed to start component [Connector[HTTP/1.1-8080]]
- Java error: unable to find or load main class (package name in source file)
- [Solved] Tomcat Startup Error: A child container failed during start、LifecycleException: Failed to start component
- JAVA: How to Read JSON Format Data (Web Game Development)
- [Solved] Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException
- java: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x590
- How to Solve Error: Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.
- [Solved] Failed to convert value of type ‘java.lang.String‘ to required type ‘java.util.Date‘;
- [Solved] Failed to introspect Class [org.springframework.cloud.netflix.hystrix.HystrixCircuitBreakerConfigura