当tomcat里部署了2个项目时就会出现此错误。单独部署运行时就没事,哪位spring大师能帮我解释一下这个问题

严重: Exception sending context initialized event to listener instance of class com.saiwei.listener.StartupListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'favoursetrulemgr' defined in ServletContext resource [/WEB-INF/classes/applicationContext-favoursetrule.xml]: Cannot create inner bean 'com.saiwei.mgr.impl.FavoursetruleManagerImpl#1727596' of type [com.saiwei.mgr.impl.FavoursetruleManagerImpl] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.saiwei.mgr.impl.FavoursetruleManagerImpl#1727596' defined in ServletContext resource [/WEB-INF/classes/applicationContext-favoursetrule.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.saiwei.dao.impl.FavoursetruleDaoImpl] to required type [com.saiwei.dao.FavoursetruleDao] for property 'dao'; nested exception is java.lang.IllegalArgumentException: Original must not be null
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
Caused by: java.lang.IllegalArgumentException: Original must not be null
at org.springframework.util.Assert.notNull(Assert.java:112)

看报的错误原因是你的项目的监听器的问题:
你的两个项目的监听器都是监听tomcat启动的吧,应该是两个监听器中的方法有冲突,你检查下
还有你应该用了spring,
Cannot create inner bean 'com.saiwei.mgr.impl.FavoursetruleManagerImpl#1727596' of type [com.saiwei.mgr.impl.FavoursetruleManagerImpl] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException
意识是无法创建FavoursetruleManagerImpl对象,检查下你的spring配置的xml文件中的target属性值
温馨提示:答案为网友推荐,仅供参考
大家正在搜