Spring—nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException
来源:互联网 发布:软件photocard 编辑:程序博客网 时间:2024/06/07 22:48
启动tomcat报错:
Unable to instantiate Action, docBorrowAction, defined for 'informationcue' in namespace '/docborrow'Error creating bean with name 'docBorrowAction' defined in ServletContext resource [/WEB-INF/config/applicationContext-framework.xml]: Cannot resolve reference to bean 'docBorrowManager' while setting bean property 'docBorrowManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'docBorrowManager': Bean with name 'docBorrowManager' has been injected into other beans [lendingMgrAction] in its raw version as part of a circular reference, but has eventually been wrapped (for example as part of auto-proxy creation). This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using 'getBeanNamesOfType' with the 'allowEagerInit' flag turned off, for example. - action - file:/D:/Tomcat%206.0/webapps/DataManager/WEB-INF/classes/com/jbpm/docborrow/action/struts-docborrow.xml:54:85
解析原因:
后来才发现原来我在两个action里都注入了docBorrowManager,在/WEB-INF/config/applicationContext-framework.xml发现
<bean id="docBorrowManager"
class="com.jbpm.docborrow.service.impl.DocBorrowManagerImpl" scope="prototype">
<property name="docBorrowDAO" ref="docBorrowDAO"/>
</bean>
解决方法:
把scope="prototype"去掉就ok了。即默认为“singleton”
- Spring—nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException
- Spring加载XSD文件小结(解决nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreE)
- spring中使用oscache报org.springframework.beans.factory.BeanCurrentlyInCreationException
- nested exception is org.springframework.beans.NotWritablePropertyException:
- Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.Be
- nested exception is org.springframework.beans.ConversionNotSupportedException的解决方法
- nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1': Can
- SpringMVC的Service互相循环调用错误: org.springframework.beans.factory.BeanCurrentlyInCreationException
- nested exception is java.lang.NoSuchMethodError: org.springframework.beans.MutablePropertyValues.add
- Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException:
- Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyExce
- SpringBoot启动报错" Unable to start embedded container; nested exception is org.springframework.beans.fa
- Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyExc
- spring org.springframework.beans.factory.BeanCreationException
- Spring-org.springframework.beans.factory.BeanNotOfRequiredTypeException
- 【spring】 org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
- spring + redis + org.springframework.beans.factory.UnsatisfiedDependencyException:
- spring异常org.springframework.beans.factory.NoSuchBeanDefinitionException
- API大全 转贴
- Illegal access: this web application instance has been stopped already. Could not load com.net.paoding.analysis.dictionary.supp
- Symbian OS高级开发篇之Ecom(1)
- 典意设计-对企业网站的看法
- JavaScript实现打印页面表报,表单输出到word和excel功能
- Spring—nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException
- Tomcat系列一:tomcat安装配置及启动(整理)
- 在 IE8 傲游 订阅 RSS
- JSP常用指令
- fdsfrsdfsdfwerdrfawe
- JBoss Developer Studio 2.0发布了
- 如何显示多重菜单,利用子菜单。
- 改进uC/OS II,减少内存使用量
- Web2.0的简介与技术