打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
at org.springframework.asm.ClassReader.<init>(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

方法测试可行。

异常栈:

  1.  INFO [main] (ZNWebSocketServer.java:35) - 2016-10-15 21:44:02,471 - Load log4j.properties from file system!  
  2.  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  
  3.  INFO [main] (XmlBeanDefinitionReader.java:315) - 2016-10-15 21:44:02,689 - Loading XML bean definitions from class path resource [applicationContext.xml]  
  4.  INFO [main] (XmlBeanDefinitionReader.java:315) - 2016-10-15 21:44:02,939 - Loading XML bean definitions from class path resource [dao.xml]  
  5. Exception in thread "main" java.lang.IllegalArgumentException  
  6.         at org.springframework.asm.ClassReader.<init>(Unknown Source)  
  7.         at org.springframework.asm.ClassReader.<init>(Unknown Source)  
  8.         at org.springframework.asm.ClassReader.<init>(Unknown Source)  
  9.         at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:52)  
  10.         at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)  
  11.         at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)  
  12.         at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)  
  13.         at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:70)  
  14.         at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:253)  
  15.         at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)  
  16.         at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)  
  17.         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)  
  18.         at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)  
  19.         at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)  
  20.         at com.szzhaona.ZNWebSocketServer.main(ZNWebSocketServer.java:41)  


本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
java.lang.IllegalArgumentException
SSH整合jar包详解.Struts2.2.3+Spring3.1.0.M2+Hibernate3.6.6
Spring+DWR 全注解版
ApplicationContext中profile指定解读
使用spring事件驱动机制,实现权限信息的自动收集存库
spring3.1.1的各个jar作用
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服