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

严重: Exception sending context initialized event to listener instance of class org.springframework.we...

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

在SSH中一个常见的Action创建异常,当启动Tomcat时:严重: Exception sending context initialized event to listener instance...

Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field

1 错误描述 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.s...

ssh搭建 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessio

转载问题解决办法

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

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thr...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

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