关于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实现注入的时候报 如下错误:
  • u014707949
  • u014707949
  • 2014-04-17 18:39:06
  • 6118

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

天天出错,天天找……哪天是个头啊
  • u014707949
  • u014707949
  • 2014-04-17 17:12:28
  • 1892

SpringMVC 问题 org.springframework.beans.factory.BeanDefinitionStoreException

type Exception report message Servlet.init() for servlet springmvc threw exception description The...
  • u012793120
  • u012793120
  • 2017-03-13 13:44:34
  • 14379

org.springframework.beans.factory.BeanDefinitionStoreException 与at org.springframework.asm.ClassRead

一、前言        这是一个关于SpringMVC报出的异常。之所以写这篇文章,因为被这个问题弄了快4个小时。最后总算是解决了。所以干脆就直接把这个恶心的错误给写出来,免得第二天没时间写。也...
  • Michael_HM
  • Michael_HM
  • 2016-09-08 01:14:59
  • 2351

使用maven打包jar后 执行jar包问题,Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefi

本人第一次发帖写的不是很好。希望大家体谅体谅。。。最近研究maven,然后用maven管理项目,打包项目后发现执行就报错,上网差了很久终于解决了。废话不多说了,看下面。很多人使用maven打包后执行j...
  • Black_ChramHeiMei
  • Black_ChramHeiMei
  • 2015-01-04 18:32:56
  • 1802

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 ...
  • u012684933
  • u012684933
  • 2015-05-27 16:42:48
  • 2905

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

异常 Exception in thread "main" java.lang.IllegalArgumentException: Comparison  method violates its ...
  • ruisheng_412
  • ruisheng_412
  • 2015-01-22 16:03:42
  • 2891

Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: java.net.

异常详情如下: Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: j...
  • swing2008
  • swing2008
  • 2016-11-19 14:41:19
  • 2579

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

一,在安装hive过程中,输入hive命令,出现了如下错误:Exception in thread "main" java.lang.IllegalArgumentException: java.ne...
  • wodedipang_
  • wodedipang_
  • 2017-05-24 23:15:14
  • 1444

Exception in thread "main" java.lang.IllegalArgumentException:declares multiple JSON fields named id

Exception in thread "main" java.lang.IllegalArgumentException: class student.vo.Student declares mul...
  • Xgx120413
  • Xgx120413
  • 2016-01-06 09:44:21
  • 3166
收藏助手
不良信息举报
您举报文章:关于spring中的一个很诡异的异常:Exception in thread "main" java.lang.IllegalArgumentException
举报原因:
原因补充:

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