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に正常にデプロイされます。
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に正常にデプロイされます。
これを修正するには、ActiveMQXSDURLをスキーマに関連付ける必要があります。
「設定」の「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
次に、2つ目を追加します。
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