2010-02-18 48 views
5

錯誤時和ActiveMQ在Eclipse中工作,你可能有時會得到一個架構解析錯誤這樣:Tomcat的理解的amq:券商但是Eclipse標誌着模式

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中成功部署。

回答

7

要解決此問題,您必須將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 

點擊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 
+1

從http得到答案:// www.bigsoft.co.uk/blog/index.php/2009/02/01/invalid-activemq-schema-name-space評論。看到他的解決方案,它使用本地jar,如果這個不適合你。回答我自己的問題。 – 2010-02-18 18:41:38