The information generated by the error is as follows:
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 [E:\develop_tools\apache-tomcat-8.0.18\webapps\ Springmvcuploadfiledemo\web-inf\classes\com\evan\action\uploadfileaction.class]; Nested exception is java.lang.IllegalArgumentException
At Org.springframework.core.type.classreading.SimpleMetadataReader. (simplemetadatareader.java:56)
At Org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader ( SIMPLEMETADATAREADERFACTORY.JAVA:80)
At Org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader ( CACHINGMETADATAREADERFACTORY.JAVA:102)
At Org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents ( classpathscanningcandidatecomponentprovider.java:257)
... More
caused by:java.lang.IllegalArgumentException
At Org.springframework.asm.ClassReader. (Unknown Source)
The reason for this is: I used the JDK8.0 version, and Spring uses 3.2.
The workaround is to reduce the build version of the project to 1.7.
Specific as follows:
Right-click on the project –properties–java Compile–compiler compliance level:
When you set up a compiled version, there will be a red fork on the project, but this will not affect the operation of the project.
=================================
The original English explanation is as follows:
You need Spring 4 if your want compile code to Java 8 (--target 1.8), but can still run apps on Java 8 compiled to Java 7 If you run on Spring 3.2.X.
ASM Classreader failed to parse class file-probably due to a new Java class file version ' that isn '