The matching wildcard is strict, but no declaration can be found for element ‘rabbit:queue‘.

web项目启动时xml解析错误,具体错误信息如下:

Offending resource: URL [jar:file:/usr/local/tomcat/webapps/ROOT/WEB-INF/lib/****-config-3.0.3-SNAPSHOT.jar!/spring-com/applicationContext-appcontext.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 15 in XML document from file [/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/spring-sub/applicationContext-mq.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 15; columnNumber: 53; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'rabbit:queue'.
09:24:14.446 [localhost-startStop-1] ERROR org.springframework.web.context.ContextLoader 312 initWebApplicationContext - Context initialization failed
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:240)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:521)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

报错的配置文件如下:
在这里插入图片描述
经排查是由于项目中引用的rabbitmq的版本和xml配置文件的约束文件中的版本不一样导致的,将xml的约束文件修改了之后,重启项目,问题解决了.
修改前后的配置文件对比如下:
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值