ASM Classreader failed to parse class file-probably due to a new Java class file version that isn

Source: Internet
Author: User

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 '

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.