geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eduardo Zanni (JIRA)" <>
Subject [jira] Created: (GERONIMO-5522) ActiveMQ + OSGi XML xBean configuration problem
Date Wed, 11 Aug 2010 20:06:17 GMT
ActiveMQ + OSGi XML xBean configuration problem

                 Key: GERONIMO-5522
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: ActiveMQ
         Environment: Apache Felix, Spring DM
            Reporter: Eduardo Zanni
            Priority: Blocker

I'm trying to use an external .xml file to configure a broker. I have the following code in
my spring bundle context:
    <bean id="brokerFactory" class="org.apache.activemq.xbean.BrokerFactoryBean">  
    	<property name="config" value="file:c:/activemq.xml" />  
    	<property name="start" value="false" />  

This should link with the configuration file with no further problems. Here is what my activemq.xml
file looks like:


  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

  <amq:broker useJmx="true" xmlns="">

      <networkConnector uri="multicast://default?initialReconnectDelay=100" />
      <networkConnector uri="static://(tcp://localhost:61616)" />

      <journalPersistenceAdapterFactory journalLogFiles="5" dataDirectory="${basedir}/target/foo"


      <transportConnector uri="tcp://localhost:61636" />


As you can see it's a pretty standard one. When starting out my bundles I get the following

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brokerManager'
defined in URL [bundle://7.0:0/META-INF/spring
/bundle-context.xml]: Cannot resolve reference to bean 'brokerFactory' while setting bean
property 'brokerFactory'; nested exception is org.springfra
mework.beans.factory.BeanCreationException: Error creating bean with name 'brokerFactory'
defined in URL [bundle://7.0:0/META-INF/spring/bundle-conte
xt.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 10 in XML 
document from OSGi resource[file:c:/activemq.xml||bnd.sym=genericenqueuer-engine]
is invalid; nested exception is org.xml.sax.SAXParseExcepti
on: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found
for element 'amq:broker'.

I have tried several configurations for the namaspaces involved. Using the broker tags with
and without the "amq:" declaration (<broker> and <amq:broker>) and specifying
the specific version number for the activemq .xsd declaration. Still, the .xsd file doesn't
seem to be found.

I am using xbean-spring version 3.7 which can be found [here|].
I have tried extracting the .xsd file from my
bundle file and exporting it on a package in one of my bundles but the parser still can't
seem to find it. Any help with this issue will be greatly appreciated.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message