spring org.springframework.beans.factory.BeanCreationException

原创 2013年12月03日 17:29:29
信息: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@13b7064: defining beans [usebean,hello,enhellobean,zhhellobean,mybean,a,b]; root of factory hierarchy
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'a' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.ioc.spring4.A]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.ioc.spring4.A.<init>()
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
	at com.ioc.spring4.Test.main(Test.java:9)
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.ioc.spring4.A]: No default constructor found; nested exception is java.lang.NoSuchMethodException: com.ioc.spring4.A.<init>()
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:58)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
	... 16 more
Caused by: java.lang.NoSuchMethodException: com.ioc.spring4.A.<init>()
	at java.lang.Class.getConstructor0(Class.java:2800)
	at java.lang.Class.getDeclaredConstructor(Class.java:2043)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:54)
	... 17 more

部署Spring AOP出现org.springframework.beans.factory.BeanCreationException解决方法

在部署Spring AOP时出现如下错误:rg.springframework.beans.factory.BeanCreationException: Error creating bean wit...

SpringMVC+Mybatis+Spring整合中org.springframework.beans.factory.BeanCreationException错误分析

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userControll...

整合Spring和Mybatis 中org.springframework.beans.factory.BeanCreationException错误

这两天学习strut2和spring的整合,启动服务器后总是爆粗如下错误, org.springframework.beans.factory.BeanCreationException:  Er...

无法创建action在spring中的bean的错:org.springframework.beans.factory.BeanCreationException: Error creating be

这个问题纠结了很久 终于解决了 原因是:我在action类的方法以外调用了其他自定义类的方法来给本类的变量赋值,所以在生成action的bean对象时这两个变量始终都是null,就无法创建...

hibernate与Spring整合时出现错误org.springframework.beans.factory.BeanCreationException: Error creating bean

hibernate与Spring整合时出现错误: org.springframework.beans.factory.BeanCreationException:Error creating b...

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lanagerServi

org.springframework.jdbc.BadSqlGrammarException: SqlMapClient operation; bad SQL grammar []; nested ...

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxx'

Spring Web MVC开发时,遇到如下错误:严重: Context initialization failed org.springframework.beans.factory.BeanCre...

org.springframework.beans.factory.BeanCreationException:No bean class specified on bean definition

今天早上调试的时候突然遇到这个问题,折腾了半天还未弄出个所以然,而且在百度查找的信息都是不能解决我的问题,所以我找到了解决方法向大家分享。 问题: 严重: Context initializati...

关于org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFac

今天在做s2sh

org.springframework.beans.factory.BeanCreationException异常原因及解决办法

2013-11-15 13:59:54 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending co...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:spring org.springframework.beans.factory.BeanCreationException
举报原因:
原因补充:

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