码迷,mamicode.com
首页 > 其他好文 > 详细

Tomcat SEVERE: Error listenerStart ... ConflictingBeanDefinitionException

时间:2015-09-16 12:08:43      阅读:604      评论:0      收藏:0      [点我收藏+]

标签:

tomcat启动时只报错: Tomcat SEVERE: Error listenerStart。没有详细的报错信息。
查询logs/localhost.XXXX.log文件找到报错信息如下:
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name ‘alipayAccountDetailDao‘ for bean class [com.xxx.audit.ca.dao.AccountDetailDao] conflicts with existing, non-compatible bean definition of same name and class [com.xxx.audit.dao.AccountDetailDao]
 
原因:
1. 两个bean的名称相同,引起冲突
2. 包冲突:检查servlet-api.jar包是否冲突。tomcat中自带了,然后工程中是否又加入了这个包,把工程的servlet-api.jar放在jdk中应该能解决
3. target下有缓存,有多个同名的class文件。可通过查找类AccountDetailDao,看一下有几个

Tomcat SEVERE: Error listenerStart ... ConflictingBeanDefinitionException

标签:

原文地址:http://www.cnblogs.com/angryorange/p/4812570.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!