at org springframework asm ClassReader init Unknown Source

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

有一次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.xmlINFO [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)


           

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow
这里写图片描述
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值