org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML doc
2015-09-18 13:50
786 查看
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [config/applicationContext.xml]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException:
Annotation-specified bean name 'areaDao' for bean class [com.amt.system.dao.impl.MessageDaoImpl] conflicts with existing, non-compatible bean definition of same name and class [com.amt.system.dao.impl.AreaDaoImpl]
这类错误有很多原因:
1、命名的重复,可能是以上的areaDao重名了
2、缺少,肯能是未找到areaDao的命名的bean
3、applicationContext.xml文件的路径不正确。可以在web.xml中添加配置信息进行指定位置
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:config/applicationContext.xml
</param-value>
</context-param>
Annotation-specified bean name 'areaDao' for bean class [com.amt.system.dao.impl.MessageDaoImpl] conflicts with existing, non-compatible bean definition of same name and class [com.amt.system.dao.impl.AreaDaoImpl]
这类错误有很多原因:
1、命名的重复,可能是以上的areaDao重名了
2、缺少,肯能是未找到areaDao的命名的bean
3、applicationContext.xml文件的路径不正确。可以在web.xml中添加配置信息进行指定位置
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:config/applicationContext.xml
</param-value>
</context-param>
相关文章推荐
- 加载一个web工程,启动tomcat出现org.springframework.web.context.ContextLoaderListener错误.
- spring错误
- org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document fro
- org.springframework.dao.InvalidDataAccessApiUsageException
- Spring在web.xml请求中定义编码(org.springframework.web.filter.CharacterEncodingFilter)
- cxf 部署项目问题
- ESXi主机已断开——解决方法
- 关于spring redis 缓存配置错误的问题
- Spring Session Data Redis 配置中遇到的坑
- 出现org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient
- org.springframework.web.servlet.DispatcherServlet noHandlerFound
- JAVA运行时报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- org.springframework.beans.factory.BeanCreationException
- Spring为web开发提供的一个类 org.springframework.web.filter.CharacterEncodingFilter
- spring-session整合redis集群的时候,No qualifying bean of type [org.springframework.session.SessionRepository
- beans.factory.BeanCreationException beans.factory.annotation.Autowired(required=true)
- 获取springMvc中的bean
- 解决grails上传文件过大,发生异常的问题
- java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- rabbitmq用户设定