关于spring中的一个很诡异的异常:Exception in thread "main" java.lang.IllegalArgumentException

原创 2017年01月03日 18:37:26

一月 03, 2017 6:35:52 下午 org.springframework.context.support.ClassPathXmlApplicationContext prepareRefresh
信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@421faab1: startup date [Tue Jan 03 18:35:52 CST 2017]; root of context hierarchy
一月 03, 2017 6:35:52 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [com/bryce/assemble/applicationContext.xml]
一月 03, 2017 6:35:52 下午 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@22f71333: defining beans [user1,user2]; root of factory hierarchy
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:110)
	at org.springframework.core.LocalVariableTableParameterNameDiscoverer.getParameterNames(LocalVariableTableParameterNameDiscoverer.java:85)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1051)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:955)
	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:626)
	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 com.bryce.assemble.Test.main(Test.java:9)


今天在配置Spring框架的时候出现了一个很诡异的异常:java.lang.IllegalArgumentException,明明xml配置文件和java类所有东西都检查过无误了,但是就是报错~郁闷。在网上找了半天终于发现一个不起眼的帖子里面有人提到,可能是jdk1.8和spring3.*不兼容,于是我换了jdk1.7试了一下,果然是这个原因。所以以后配置框架之前一定要先了解清楚框架兼容的环境是什么,否则会白白浪费很多时间。

android的DialogFragment设置全屏之后,里面的View不能充满整个屏幕

将DialogFragment全屏之后, 里面View的布局类似是这样子的。

websocket 简易聊天

//通过命令行执行php文件 如 php -q index.php // php -S localhost:8000 浏览器访问index.html //index.html ...

安装Hive过程中,出现Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxExcepti

一,在安装hive过程中,输入hive命令,出现了如下错误:Exception in thread "main" java.lang.IllegalArgumentException: java.ne...

hadoop job 抛出 Exception in thread "main" java.lang.NoClassDefFoundError: ___/tmp/hsperfdata_ 异常

hadoop的job抛出以下异常: Exception in thread "main" java.lang.NoClassDefFoundError: ___/tmp/hsperfdata_pct...

异常:Exception in thread "main" java.lang.ClassNotFoundException: Student

在学习反射时 : 加载类是:Class c = Class.forName("Student");//加载类

Exception in thread "main" java.lang.ArithmeticException: Non-terminating decimal expansion; no exac

1、错误描述Exception in thread "main" java.lang.ArithmeticException: Non-terminating decimal expansion; n...

Exception in thread "main" java.lang.ClassCastException: $Proxy0 利用匿名内部类创建InvocationHandler接口实现

这里错误的描述大致为:不能将动态代理的返回对象强转为对应的类! 对于这个错误,最终原因还是没弄清楚,但是最后发现了错误的根源,再次跟大家分享一下!先贴出整个创建动态代理类需要的类以及接口。值得注意的...
  • lds_lsj
  • lds_lsj
  • 2015年05月24日 12:39
  • 493

Exception in thread "main" java.lang.NoClassDefFoundError

Exception in thread "main" java.lang.NoClassDefFoundError

Exception in thread "main" java.lang.NoClassDefFoundError 问题的解决办法

背景描述:我从一个MyEclipse中拷贝项目至令一个MyEclipse,运行报错: Exception in thread "main" java.lang.NoClassDefFoundErro...
  • raphero
  • raphero
  • 2011年10月08日 16:02
  • 1409
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:关于spring中的一个很诡异的异常:Exception in thread "main" java.lang.IllegalArgumentException
举报原因:
原因补充:

(最多只允许输入30个字)