at org.springframework.asm.ClassReader.<init>(Unknown Source)
来源:互联网 发布:电脑什么软件跑分准 编辑:程序博客网 时间:2024/05/17 23:23
有一次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)
1 0
- 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.asm.ClassReader.<init>(Unknown Source)
- eclipse报错 at org.springframework.asm.ClassReader.<init>(Unknown Source)
- java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.<init>(Unknown Source)
- java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.<init>(Unknown Source)
- bug-解决-springMVC框架 启动tomcat时 (at org.springframework.asm.ClassReader.<init>(Unknown Source))问题
- spring web项目启动报错,java.lang.IllegalArgumentException at org.springframework.asm.ClassReader.<init>
- IllegalArgumentException at org.springframework.asm.ClassReader when initializing Spring context
- java.lang.IllegalArgumentException org.springframework.asm.ClassReader.
- 那些年踩过的坑之(3)IllegalArgumentException at org.springframework.asm.ClassReader when initializing Spring
- at javax.swing.ImageIcon.<init>(Unknown Source)
- at javax.swing.ImageIcon.<init>(Unknown Source)
- Maven -- Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed to parse clas
- JUnit报错nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to...
- nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse cla
- org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file
- 线程间通讯机制——深入浅出实现原理
- 大数据怎么收集?
- Codeforces 727B 字符串处理
- Counterfeit Dollar HDU1482题 FZU1003题 POJ1013题
- 【Android开发】线程间通讯机制(基础篇)——Handler、Runnable、HandlerThread、AsyncTask的使用
- at org.springframework.asm.ClassReader.<init>(Unknown Source)
- 二叉树最大路径和
- Android Studio如何轻松整理字符串到string.xml中
- unity OnTriggerEnter 函数测试
- 运算符
- C++学习日记
- 常用3D模型的相关资源整理
- leetCode练习(72)
- 十进制转换为-2进制