java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.init(Unknown Source)
之前做的一個項目,在一次系統(tǒng)安全檢查中發(fā)現(xiàn)用到的tomcat7存在遠程執(zhí)行漏洞,要求對tomcat進行升級,然后就升級到了8.5.20版本,順帶著就把Java版本由7升級到了8,然后就出問題了!哎!能這么說也是后來解決了這個問題才理清楚了思路!真的是只有錯過之后才只要對的要怎么搞!環(huán)境的問題真的好難搞!好的,簡單介紹一下環(huán)境!
window7
IDE用的intellij idea 2017.1.5
jdk 1.7.0_80
tomcat 8.5.20
spring版本 3.2.0.RELEASE
maven版本 apache-maven-3.3.9
這次問題的絕對真的多虧了stackoverflow;之前在csdn和博客園也查了好久,但是都沒有我需要的答案,真心推薦給各位程序猿!
具體錯誤如下:
java.lang.IllegalArgumentException
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.core.type.classreading.SimpleMetadataReader.(SimpleMetadataReader.java:52)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)
at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298)
at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:230)
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:153)
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:285)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
這個錯誤的根本原因在
java.lang.IllegalArgumentException org.springframework.asm.ClassReader.(Unknown Source)
org.springframework.asm.ClassReader.(Unknown Source)
org.springframework.asm.ClassReader.(Unknown Source)
主要是因為spring版本與Java版本以對應(yīng)導(dǎo)致的,我剛才前面提到的我一開始手癢在升級tomcat的時候?qū)dk也做了升級,就是這個操作導(dǎo)致了這個錯誤,這個地方需要記住兩點
spring 3.X版本支持到j(luò)ava7
spring 4.X版本支持Java8最低支持到Java6
想了解詳細情況的小猴子可以參考這篇文章:Spring Framework 4 and Java 8
日常做筆記,希望能幫助到同樣問題的伙伴!
出處:https://blog.csdn.net/yangjiabei_0301/article/details/78247193
總結(jié)
以上是生活随笔為你收集整理的java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.init(Unknown Source)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 数据结构:线性表(java实现)
- 下一篇: SpringMVC控制器接收不了PUT提