I'm trying to deploy an embedded activemq broker in a war bundle. However, I seem to get an intermittent error that requires me to deploy my war with the activemq schema references in place successfully before actually putting in the broker config. I have a bundle dependency on com.springsource.org.apache.activemq 5.3.0 in my war, with a corresponding embedded broker configuration. However, when I try to start the war bundle I get an initialization error:
The only way I've found to make this work is to add the activemq schema references into the beans tag and deploy the war (which it does successfully) and then add the broker config and redeploy. That works reliably, but every time I restart my server I have to remove the broker configuration, deploy the war, add the broker configuration back in and deploy it again. I've tried dropping the activemq bundle into the pickup folder (instead of repository/usr) but that makes no difference. What am I doing wrong?Code:XML validation warning org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://activemq.apache.org/schema/core/activemq-core.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
I'm using STS 2.3.0, by the way, and doing "hot" deployment.
Here's the spring context file:
Code:<?xml version="1.0" encoding="UTF-8"?> <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:osgi="http://www.springframework.org/schema/osgi" xmlns:osgix="http://www.springframework.org/schema/osgi-compendium" 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 http://www.springframework.org/schema/osgi/spring-osgi.xsd http://www.springframework.org/schema/osgi-compendium http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> <osgi:reference id="osgiDictionaryService" interface="com.gehc.ce.poc.dictionary.services.DictionaryService" filter="(backend=${backend})"/> <context:property-placeholder properties-ref="configAdminProperties"/> <osgix:cm-properties id="configAdminProperties" persistent-id="dictionary"> <prop key="backend">memory</prop> <prop key="importqueue">queue.import</prop> </osgix:cm-properties> <broker useJmx="true" persistent="false" xmlns="http://activemq.apache.org/schema/core"> <persistenceAdapter> <kahaDB directory="serviceability/activemq"/> </persistenceAdapter> <transportConnectors> <transportConnector uri="tcp://localhost:61616" /> </transportConnectors> </broker> </beans>


