at org.springframework.asm.ClassReader.(Unknown Source)
有一次down同事的程式碼下來執行,結果發現執行不起來,一開始懷疑是配置問題,但同事那邊是ok,那想著就是環境問題了,但看了許久,發現也沒有看出來,看了下是asm包報出來,然後看asm是Cglib依賴進來的,想著這個問題就應該是版本衝突導致的吧,google了一下,果真發現是jdk7和jdk8版本導致專案中依賴起了衝突。mark一下:專案中用到spring還是3.2的版本,然後看到stackoverflow是這麼回答的:
The exception you see is not very likely to be cause by invalid Spring configuration but your classpath setup. This feels like a version incompatibility regarding the ASM libraries and Java 8. The ASM version, Spring 3.2 depends on is known to be incompatible
with Java 8.
Thus, if you want run your code with Java 8, you need to use a recent Spring 4.0 version
方法測試可行。
異常棧:
INFO [main] (ZNWebSocketServer.java:35) - 2016-10-15 21:44:02,471 - Load log4j.properties from file system!
INFO [main] (AbstractApplicationContext.java:510) - 2016-10-15 21:44:02,596 - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@e2144e4: startup date [Sat Oct 15 21:44:02 CST 2016]; root of context hierarchy
INFO [main] (XmlBeanDefinitionReader.java:315) - 2016-10-15 21:44:02,689 - Loading XML bean definitions from class path resource [applicationContext.xml]
INFO [main] (XmlBeanDefinitionReader.java:315) - 2016-10-15 21:44:02,939 - Loading XML bean definitions from class path resource [dao.xml]
Exception in thread "main" java.lang.IllegalArgumentException
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(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.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:70)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:253)
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.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at com.szzhaona.ZNWebSocketServer.main(ZNWebSocketServer.java:41)
相關文章
- Unknown custom element: <> -
- source map
- ERROR | [iOS] unknown: Encountered an unknown error (Could not find a `ios` simulator (valid values:ErroriOS
- [vuex] unknown action typeVue
- Unknown Mother-GooseGo
- mysql Unknown error 1054MySqlError
- Swift 5.0 值得關注的特性:Handle unknown values using "@unknown default"Swift
- unknown host 主機名
- Unknown Treasure(hdu5446)
- 09-dispatch_source
- source insight的使用
- linux下source命令Linux
- postgresql安裝(source)SQL
- Source Generator實戰
- [unknown OJ] ZZH與揹包
- 學習Source Generators之瞭解Source Generators的應用場景
- manifest vs source-map
- Tree – AdaBoost with sklearn source code
- Flume - [02] Spooling Directory Source
- source insight4配置
- MySQL中的source命令MySql
- EventID:13 Source:NPS -------Radius
- TensorFlow Build from Source for macOSUIMac
- account_sdk_source_info
- DataTables 1.10錯誤: requested unknown parameter
- The version given was unknown or has no registered routes.
- SQLSTATE[HY000] [1049] Unknown databaseSQLDatabase
- QTCreator 除錯:unknown debugger type “No engine“QT除錯
- [集訓隊互測2016] Unknown
- 學習Source Generators之HelloWorld
- 學習Source Generators之IncrementalValueProviderREMIDE
- XCTF-Reverse:open-source
- OSC Source Code Innovation Salon(2018.10.20)
- Build a TensorFlow pip package from sourceUIPackage
- Source Generator 單元測試
- Chrome View Source Code 那些事ChromeView
- [LeetCode] 702. Search in a Sorted Array of Unknown SizeLeetCode
- nginx 啟動報錯 unknown directive "server"NginxServer
- Vuex中使用報錯unknown mutation typeVue