码迷,mamicode.com
首页 > 编程语言 > 详细

JDK8+spring 3.x报非法参数异常IllegalArgumentException

时间:2015-06-04 09:49:25      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:spring   jdk 8   illegalargumentexcep   spring 3.x冲突jdk 8   exception   

2015-06-04 01:21:35,306  INFO DefaultListableBeanFactory:577 - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@64616ca2: defining beans [user,userDao]; root of factory hierarchy
2015-06-04 01:21:35,308 DEBUG DefaultListableBeanFactory:215 - Creating shared instance of singleton bean 'user'
2015-06-04 01:21:35,308 DEBUG DefaultListableBeanFactory:435 - Creating instance of bean 'user'
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.LocalVariableTableParameterNameDiscoverer.inspectClass(LocalVariableTableParameterNameDiscoverer.java:112)
	at org.springframework.core.LocalVariableTableParameterNameDiscoverer.getParameterNames(LocalVariableTableParameterNameDiscoverer.java:86)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1049)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:953)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
	at cn.wxy.test.Test.main(Test.java:10)


异常原因:JDK 8和spring 3.x不匹配,换成spring 4.x就可以了

spring官网跟新后,推荐maven和gradle两种下载方式,直接下载spring framework jar包比较困难,以下链接为spring svn地址。

点我下载(http://repo.springsource.org/libs-release-local/org/springframework/spring/)


版本冲突bug:spring framwork 3.x和JDK 8冲突

JDK8+spring 3.x报非法参数异常IllegalArgumentException

标签:spring   jdk 8   illegalargumentexcep   spring 3.x冲突jdk 8   exception   

原文地址:http://blog.csdn.net/reliveit/article/details/46354149

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!