Tomcat了解amq:broker,但Eclipse标记了模式中的错误 [英] Tomcat understands amq:broker but Eclipse marks errors in schema
本文介绍了Tomcat了解amq:broker,但Eclipse标记了模式中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
导致:org。 xml.sax.SAXParseException:cvc-complex-type.2.4.c:
匹配的通配符是严格的,但不能为元素amq:broker找到声明。
但是,该项目在Tomcat中成功部署。
解决方案
要解决此问题,您必须将ActiveMQ XSD URL与模式相关联。
转到XML-> XML目录在首选项中,并添加用户指定的条目。
位置:http://activemq.apache.org/schema/core/ activemq-core-5.3.0.xsd
密钥类型:命名空间名称
密钥:http://activemq.apache.org/schema/core
然后添加第二个:
位置:http: //activemq.apache.org/schema/core/activemq-core-5.3.0.xsd
密钥类型:模式位置
密钥:http://activemq.apache.org/schema/core/ activemq-core.xsd
点击OK。
如果您有同样的错误,Tomcat失败,请打开引发错误并替换的applicationContext-jms.xml文件:
http://activemq.apache.org/schema/core/activemq-core-5.2 .0.xsd
与
http://activemq.apache.org/schema/core/activemq-core.xsd
When working with ActiveMQ in Eclipse, you might sometimes get a schema parsing error as such:
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c:
The matching wildcard is strict, but no declaration can be found for element 'amq:broker'.
However, the project deploys successfully in Tomcat.
解决方案
To fix this, you must associate the ActiveMQ XSD URL with the schema.
Go to XML->XML Catalog in Preferences, and add a User Specified Entry.
Location: http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd
Key Type: Namespace Name
Key: http://activemq.apache.org/schema/core
Then add a second one:
Location: http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd
Key Type: Schema Location
Key: http://activemq.apache.org/schema/core/activemq-core.xsd
Hit OK.
If you have this same error and Tomcat fails, open the applicationContext-jms.xml file which triggers the error and replace:
http://activemq.apache.org/schema/core/activemq-core-5.2.0.xsd
with
http://activemq.apache.org/schema/core/activemq-core.xsd
这篇关于Tomcat了解amq:broker,但Eclipse标记了模式中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文