关于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试了一下,果然是这个原因。所以以后配置框架之前一定要先了解清楚框架兼容的环境是什么,否则会白白浪费很多时间。

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Li

实现Spring 的jdbcTemplate实现注入的时候报 如下错误:

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating b

天天出错,天天找……哪天是个头啊

Exception in thread "main" java.lang.IllegalArgumentException: Some primary key columns are missing

Exception in thread "main" java.lang.IllegalArgumentException: Some primary key columns are missing ...

Exception in thread "main" java.lang.illegalArgumentException : illegal component position

转载自 : qeclapkXjnwKRvgA35ONBqWegvnNowOlZIFA3sMg_bjgLXZ9blCmNQPvcfBT_- illegalArgumentException----...

Exception in thread "main" java.lang.IllegalArgumentException

1、错误描述 Exception in thread "main" java.lang.IllegalArgumentException: Cannot format given Object as ...

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

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

用javah 导出类的头文件, 常见的错误及正确的使用方法

******************************************************************************** 用javah 导出类的头文件, 常见的...

Exception in thread "main" java.lang.IllegalArgumentException: adding a window to a container

先看一下两个类 public class ImagePanel extends JFrame{ …… } public class ImageTest{  public static voi...

java 集合排序异常Exception in thread "main" java.lang.IllegalArgumentException: Comparison method violate

异常 Exception in thread "main" java.lang.IllegalArgumentException: Comparison  method violates its ...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

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