Tomcat 理解 amq:broker 但 Eclipse 在模式中标记错误

发布于 2024-08-22 13:42:46 字数 263 浏览 2 评论 0原文

在 Eclipse 中使用 ActiveMQ 时,有时可能会遇到如下模式解析错误:

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'.  

但是,该项目在 Tomcat 中部署成功。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我很坚强 2024-08-29 13:42:46

要解决此问题,您必须将 ActiveMQ XSD URL 与架构相关联。

转到“首选项”中的“XML”->“XML 目录”,然后添加“用户指定的条目”。

Location: http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd
Key Type: Namespace Name
Key: http://activemq.apache.org/schema/core

然后添加第二个:

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

点击“确定”。

如果您遇到同样的错误并且 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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文