我遇到了令人困扰的一个令我困惑的问题,我想知道有没有人能给我一些见解。Spring/OSGi中嵌入式ActiveMQ代理问题
基本上,我想要做的是在我的一个OSGi包(在Felix中)的Spring上下文中设置嵌入式ActiveMQ代理。我已下载了this页面中列出的软件包和所有依赖项。他们都在运转。下面是我的Spring上下文XML文件的样子:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:jms="http://www.springframework.org/schema/jms"
xmlns:amq="http://activemq.apache.org/schema/core"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/osgi-compendium http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-2.5.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- some uninteresting parts ommited -->
<!-- JMS Configurations -->
<amq:broker useJmx="false" start="true">
<amq:transportConnectors>
<amq:transportConnector uri="tcp://localhost:0"/>
</amq:transportConnectors>
</amq:broker>
<!-- other ActiveMQ configs such as destinations and whatnot -->
这看起来相当好的给我。然而,在启动过程中,我得到了以下信息:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 41 in XML document from URL [bundle://121.0:0/META-INF/spring/bundle-context.xml] is invalid; nested exception is 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'.
我发现有人遇到在Eclipse(这我还使用)一个类似的问题,他们显然是做的Eclipse点捆绑的解决了这个问题。 ActiveMQ jar中的xsd文件。我试图这样做,唉,无济于事。
有没有人有什么想法,我可能会在这里失踪?
在此先感谢。
即使这被接受,它也不是一个好的答案。这应该是一个评论。 – 2012-04-24 06:27:26