nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException

记一次启动tomcat时,遇到的无法加载[spring/dubbo-service.xml][spring/spring-context.xml]问题。

今天在生产环境部署一个dubbo项目,遇到如下报错:

2022-03-23 17:12:24.553 ERROR TraceId[] From[] To[] org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [dubbo-service.xml]
Offending resource: class path resource [spring/spring-context.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [dubbo-consumer.xml]
Offending resource: class path resource [spring/dubbo-service.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from class path resource [spring/dubbo-consumer.xml] is invalid; nested exception is org.xml.sax.SAXParseException; systemId: http://code.alibabatech.com/schema/dubbo/dubbo.xsd; lineNumber: 6; columnNumber: 68; TargetNamespace.1: Expecting namespace 'http://code.alibabatech.com/schema/dubbo', but the target namespace of the schema document is 'http://dubbo.apache.org/schema/dubbo'.
	at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70)
	at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
	at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)

Expecting namespace ‘http://code.alibabatech.com/schema/dubbo’, but the target namespace of the schema document is ‘http://dubbo.apache.org/schema/dubbo’.

问题原因:

dubbo 版本冲突!!!

找到lib目录里的dubbo包,删掉低版本的即可,问题解决

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值