日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.init(Unknown Source)

發布時間:2025/3/20 47 豆豆
生活随笔 收集整理的這篇文章主要介紹了 java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.init(Unknown Source) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

之前做的一個項目,在一次系統安全檢查中發現用到的tomcat7存在遠程執行漏洞,要求對tomcat進行升級,然后就升級到了8.5.20版本,順帶著就把Java版本由7升級到了8,然后就出問題了!哎!能這么說也是后來解決了這個問題才理清楚了思路!真的是只有錯過之后才只要對的要怎么搞!環境的問題真的好難搞!好的,簡單介紹一下環境!

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版本以對應導致的,我剛才前面提到的我一開始手癢在升級tomcat的時候對jdk也做了升級,就是這個操作導致了這個錯誤,這個地方需要記住兩點
spring 3.X版本支持到java7
spring 4.X版本支持Java8最低支持到Java6
想了解詳細情況的小猴子可以參考這篇文章:Spring Framework 4 and Java 8

日常做筆記,希望能幫助到同樣問題的伙伴!

出處:https://blog.csdn.net/yangjiabei_0301/article/details/78247193

總結

以上是生活随笔為你收集整理的java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.init(Unknown Source)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。