[mule-user] Integrating mule with active MQ

53 views
Skip to first unread message

Mohit Anchlia

unread,
Sep 26, 2011, 8:20:35 PM9/26/11
to us...@mule.codehaus.org
I am currently debating if entire configuration should be part of mule
config or should I just point to activemq-config.xml file. I am
leaning towards having a separte config file.

Also, for ESB 3 I am unable to find an example that would use something like:

http://mule.1045714.n5.nabble.com/how-to-config-ActiveMQ-in-the-mule-td2675882.html


Any pointers will be helpful.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


David Dossot

unread,
Sep 26, 2011, 8:37:05 PM9/26/11
to us...@mule.codehaus.org
I am currently debating if entire configuration should be part of mule
config or should I just point to activemq-config.xml file. I am
leaning towards having a separte config file.

That's a good option.
 
Also, for ESB 3 I am unable to find an example that would use something like:

http://mule.1045714.n5.nabble.com/how-to-config-ActiveMQ-in-the-mule-td2675882.html

Mohit Anchlia

unread,
Sep 26, 2011, 11:11:08 PM9/26/11
to us...@mule.codehaus.org
Thanks! but I am not seeing equivalent option of:

<property name="brokerXmlConfig" value="classpath:activemq-config.xml" />

---------------------------------------------------------------------

David Dossot

unread,
Sep 27, 2011, 12:18:26 AM9/27/11
to us...@mule.codehaus.org
Refer to the ActiveMQ connection factory bean you've defined in active-config.xml in the connector:

  <jms:activemq-connector name="EsbJmsConnector"
                          specification="1.1"
                          connectionFactory-ref="AmqConnectionFactory"
                          disableTemporaryReplyToDestinations="true"
                          persistentDelivery="true" />
Of course you need to also import active-config.xml in your Mule XML config using the standard spring:import mechanism.

HTH
D.

David Dossot

unread,
Sep 27, 2011, 12:37:58 AM9/27/11
to us...@mule.codehaus.org

Precision: you need to import *or* load side by side the ActiveMQ config, depending on how you organize your Mule configs.

D.

On 2011-09-26 9:18 PM, "David Dossot" <da...@dossot.net> wrote:

Refer to the ActiveMQ connection factory bean you've defined in active-config.xml in the connector:

  <jms:activemq-connector name="EsbJmsConnector"
                          specification="1.1"
                          connectionFactory-ref="AmqConnectionFactory"
                          disableTemporaryReplyToDestinations="true"
                          persistentDelivery="true" />
Of course you need to also import active-config.xml in your Mule XML config using the standard spring:import mechanism.

HTH
D.




On Mon, Sep 26, 2011 at 8:11 PM, Mohit Anchlia <mohita...@gmail.com> wrote:
>

> Thanks! but I ...

Mohit Anchlia

unread,
Sep 27, 2011, 12:08:51 PM9/27/11
to us...@mule.codehaus.org
So it means that I can copy paste and edit the configuration in a file
from http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html

and then import it in mule-config using spring. and then reference the
factory in jms connector?

---------------------------------------------------------------------

David Dossot

unread,
Sep 27, 2011, 12:12:22 PM9/27/11
to us...@mule.codehaus.org
If you take the example under "Using Spring 2.0" that should work.

Mohit Anchlia

unread,
Sep 27, 2011, 12:14:40 PM9/27/11
to us...@mule.codehaus.org
I am trying to figure out that in that example how to specify
persistence, data dir etc. Do you happen to know?

Thanks

David Dossot

unread,
Sep 27, 2011, 12:25:17 PM9/27/11
to us...@mule.codehaus.org
It's on the amq:broker element. See: http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd

Mohit Anchlia

unread,
Sep 27, 2011, 12:47:08 PM9/27/11
to us...@mule.codehaus.org
Thanks I'll take a look.

Another question I have is that if I want this xml shared between
various mule application and I am trying to import using:

<bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
<property name="config"
value="classpath:org/apache/activemq/xbean/activemq.xml" />
<property name="start" value="true" />
</bean>


then where should I put activemq.xml such that it can be imported by
various mule application running in the same mule standalone server.
Should it be somewhere in shared config directory on mule config? But
for my unit test I still face that problem.

Mohit Anchlia

unread,
Sep 27, 2011, 1:01:22 PM9/27/11
to us...@mule.codehaus.org
I am wondering if it's ok to put it in a common jar file. It should be
able to find that config since the jar is in the classpath?

David Dossot

unread,
Sep 27, 2011, 1:12:02 PM9/27/11
to us...@mule.codehaus.org
Sure but does it make sense? You can't start n ActiveMQ brokers with the same configs in your n Mule apps.

Mohit Anchlia

unread,
Sep 27, 2011, 1:24:01 PM9/27/11
to us...@mule.codehaus.org
why not if all of them would use same properties like persistence, data dir etc?

David Dossot

unread,
Sep 27, 2011, 1:31:31 PM9/27/11
to us...@mule.codehaus.org
I don't think you can have several brokers sharing the same data dir, but I may be wrong.

It's an interesting use case, I've never seen a one JMS-broker-per-Mule-application deployment before, I'm curious to see how this goes and why you do need that.

D.

Mohit Anchlia

unread,
Sep 27, 2011, 1:48:31 PM9/27/11
to us...@mule.codehaus.org
This brings me to another question. We are planning to use active mq
as embedded in mule standalone. Does it mean each application will
have it's own instance of active mq? In other words if I send message
to queue Q1 in application A I shouldn't expect it to be received on
queue Q1 in application B running in the same mule standalone?

David Dossot

unread,
Sep 27, 2011, 1:56:22 PM9/27/11
to us...@mule.codehaus.org
Usually I embed one ActiveMQ broker in one Mule app only and connect the others to it.

If you embed one ActiveMQ broker in each Mule application you will have to cluster ActiveMQ into a network of broker in order to have distributed queues and achieve what your're describing below.

Mohit Anchlia

unread,
Sep 27, 2011, 2:10:19 PM9/27/11
to us...@mule.codehaus.org
ok. Or have a common mule application so that if one application is
down or being deployed for some reason it still doesn't impact the
other.

Mohit Anchlia

unread,
Sep 27, 2011, 3:58:39 PM9/27/11
to us...@mule.codehaus.org
I am trying to test this configuration and I am getting following exception:

1. I created active-mq.xml which is copy and paste from section
"Spring 2.0" of
http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html
2. I create mule-config.xml which is:

<spring:beans>
<spring:import resource="jms/active-mq.xml" />
</spring:beans>

<spring:bean id="broker"
class="org.apache.activemq.xbean.BrokerFactoryBean">
<spring:property name="config" value="classpath:jms/active-mq.xml" />
<spring:property name="start" value="true" />
</spring:bean>

<jms:activemq-connector name="JMSConnector"
maxRedelivery="1" connectionFactory-ref="connectionFactory" />

When I run my test and try to load the config I get. Is there
something basic I am not following?

================================================================================
= Testing: testJmsMessage =
================================================================================
[09-27 12:54:22] WARN XmlBeanDefinitionReader [main]: Ignored 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>.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:96)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:380)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:2541)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaWarning(XSDHandler.java:2532)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:1836)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:531)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:552)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2437)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1782)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:235)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:202)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:147)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:132)
at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:45)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.handleSpringElements(MuleHierarchicalBeanDefinitionParserDelegate.java:162)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:70)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:130)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:141)
at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:45)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.mule.config.spring.MuleApplicationContext.loadBeanDefinitions(MuleApplicationContext.java:107)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:107)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:116)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:73)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:80)
at org.mule.tck.AbstractMuleTestCase.createMuleContext(AbstractMuleTestCase.java:512)
at org.mule.tck.AbstractMuleTestCase.setUp(AbstractMuleTestCase.java:451)
at junit.framework.TestCase.runBare(TestCase.java:132)
at org.mule.tck.AbstractMuleTestCase.runBare(AbstractMuleTestCase.java:303)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at org.mule.tck.AbstractMuleTestCase.run(AbstractMuleTestCase.java:282)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
[09-27 12:54:22] ERROR SpringXmlConfigurationBuilder [main]:
Configuration with
"org.mule.config.spring.SpringXmlConfigurationBuilder" failed.
org.mule.api.lifecycle.InitialisationException: Configuration problem:
Failed to import bean definitions from relative location
[jms/active-mq.xml]
Offending resource: URL
[file:/C:/upb/dp/manchlia-dp/depot/services/data-platform/trunk/startup/target/test-classes/mule-config.xml];
nested exception is
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 10 in XML document from URL
[file:/C:/upb/dp/manchlia-dp/depot/services/data-platform/trunk/startup/target/test-classes/jms/active-mq.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'.
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:115)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:116)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:73)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:80)
at org.mule.tck.AbstractMuleTestCase.createMuleContext(AbstractMuleTestCase.java:512)
at org.mule.tck.AbstractMuleTestCase.setUp(AbstractMuleTestCase.java:451)
at junit.framework.TestCase.runBare(TestCase.java:132)
at org.mule.tck.AbstractMuleTestCase.runBare(AbstractMuleTestCase.java:303)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at org.mule.tck.AbstractMuleTestCase.run(AbstractMuleTestCase.java:282)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Failed to import bean definitions from relative
location [jms/active-mq.xml]
Offending resource: URL
[file:/C:/upb/dp/manchlia-dp/depot/services/data-platform/trunk/startup/target/test-classes/mule-config.xml];
nested exception is
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 10 in XML document from URL
[file:/C:/upb/dp/manchlia-dp/depot/services/data-platform/trunk/startup/target/test-classes/jms/active-mq.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'.
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:218)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:147)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:132)
at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:45)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.handleSpringElements(MuleHierarchicalBeanDefinitionParserDelegate.java:162)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:70)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:130)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:141)
at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:45)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.mule.config.spring.MuleApplicationContext.loadBeanDefinitions(MuleApplicationContext.java:107)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:107)
... 23 more
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 10 in XML document from URL
[file:/C:/upb/dp/manchlia-dp/depot/services/data-platform/trunk/startup/target/test-classes/jms/active-mq.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'.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:202)
... 45 more
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'.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:417)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3182)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1927)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:235)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
... 48 more

David Dossot

unread,
Sep 27, 2011, 4:13:56 PM9/27/11
to us...@mule.codehaus.org
Why importing and also force-loading it?

Mohit Anchlia

unread,
Sep 27, 2011, 4:26:23 PM9/27/11
to us...@mule.codehaus.org
I thought one is to start the broker (only) and other required to
import so that I can use in connectionfactory-ref? I just need one?

David Dossot

unread,
Sep 27, 2011, 4:30:06 PM9/27/11
to us...@mule.codehaus.org
what is inside active-mq.xml ?

Mohit Anchlia

unread,
Sep 27, 2011, 4:36:21 PM9/27/11
to us...@mule.codehaus.org
active-mq.xml which is copy and paste from section "Spring 2.0" of
http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html

David Dossot

unread,
Sep 27, 2011, 4:41:13 PM9/27/11
to us...@mule.codehaus.org
see "jmsFactory" in there? that's what you'll use in the mule connector.

also, unless you do Spring JMS, you don't need the JMS template configuration.

and of course the demo pojo stuff should go too.

Mohit Anchlia

unread,
Sep 27, 2011, 4:48:55 PM9/27/11
to us...@mule.codehaus.org
now this is exactly what I have still I get this error. xsd is
supposed to be in active mq jars I am assuming and those are in the
classpath.

active-mq.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">

<!-- lets create an embedded ActiveMQ Broker -->
<amq:broker useJmx="false" persistent="false">
<amq:transportConnectors>
<amq:transportConnector uri="tcp://localhost:0" />
</amq:transportConnectors>
</amq:broker>

<!-- ActiveMQ destinations to use -->
<amq:queue id="destination"
physicalName="org.apache.activemq.spring.Test.spring.embedded"/>

<!-- JMS ConnectionFactory to use, configuring the embedded broker
using XML -->
<amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost"/>
</beans>


mule-config.xml:

<spring:beans>
<spring:import resource="jms/active-mq.xml" />
</spring:beans>

<spring:bean id="broker"
class="org.apache.activemq.xbean.BrokerFactoryBean">
<spring:property name="config" value="classpath:jms/active-mq.xml" />
<spring:property name="start" value="true" />
</spring:bean>

<jms:activemq-connector name="JMSConnector"
maxRedelivery="1" connectionFactory-ref="connectionFactory" />

Error:


================================================================================
= Testing: testJmsMessage =
================================================================================

[09-27 13:46:06] WARN XmlBeanDefinitionReader [main]: Ignored XML

[09-27 13:46:06] ERROR SpringXmlConfigurationBuilder [main]:

David Dossot

unread,
Sep 27, 2011, 5:20:34 PM9/27/11
to us...@mule.codehaus.org
Why do you still have this?

       <spring:bean id="broker"
               class="org.apache.activemq.xbean.BrokerFactoryBean">
               <spring:property name="config" value="classpath:jms/active-mq.xml" />
               <spring:property name="start" value="true" />
       </spring:bean>

Also do you have the activemq-spring JAR in your classpath?

Mohit Anchlia

unread,
Sep 27, 2011, 5:32:42 PM9/27/11
to us...@mule.codehaus.org
don't I need that spring:bean to start the broker?

I only have activeio and activecore in my classpath. I can't seem to
find correct artifactId for activemq-spring.

<!-- ActiveMQ for JMS -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>4.1.2</version>
<exclusions>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-console</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-jaas</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-optional</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-web</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-web-demo</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core-test</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
</exclusion>
<exclusion>
<groupId>activemq</groupId>
<artifactId>jmdns</artifactId>
</exclusion>
<exclusion>
<groupId>activesoap</groupId>
<artifactId>jaxp-api</artifactId>
</exclusion>
<exclusion>
<groupId>javacc</groupId>
<artifactId>javacc</artifactId>
</exclusion>
<exclusion>
<groupId>activecluster</groupId>
<artifactId>activecluster</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.derby</groupId>
<artifactId>derbynet</artifactId>
</exclusion>
<!-- Mule ships a more recent version -->
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xmlParserAPIs</artifactId>
</exclusion>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
<exclusion>
<groupId>xmlbeans</groupId>
<artifactId>xmlbeans-jsr173-api</artifactId>
</exclusion>
<exclusion>
<groupId>xstream</groupId>
<artifactId>xstream</artifactId>
</exclusion>
<exclusion>
<groupId>xmlpull</groupId>
<artifactId>xmlpull</artifactId>
</exclusion>
<exclusion>
<groupId>mx4j</groupId>
<artifactId>mx4j</artifactId>
</exclusion>
<exclusion>
<groupId>mx4j</groupId>
<artifactId>mx4j-remote</artifactId>
</exclusion>
<exclusion>
<groupId>backport-util-concurrent</groupId>
<artifactId>backport-util-concurrent</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jsp_2.0_spec</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-jacc_1.0_spec</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<!-- we want newer beanutils via core -->
<exclusion>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
</exclusion>
<!-- This exclusion is to force use of the new cglib -->
<exclusion>
<groupId>cglib</groupId>
<artifactId>cglib-full</artifactId>
</exclusion>
</exclusions>
</dependency>

David Dossot

unread,
Sep 27, 2011, 5:35:20 PM9/27/11
to us...@mule.codehaus.org
don't I need that spring:bean to start the broker?

you have  <amq:broker useJmx="false" persistent="false"> in your activemq config


I only have activeio and activecore in my classpath. I can't seem to
find correct artifactId for activemq-spring.

Mohit Anchlia

unread,
Sep 27, 2011, 6:12:33 PM9/27/11
to us...@mule.codehaus.org
I will try adding activemq-spring and see

I am going to turn useJmx="true" . I am assuming it will work then. If
I don't turn that on then how does the broker gets started? Is it done
by mule or activemq?

---------------------------------------------------------------------

David Dossot

unread,
Sep 27, 2011, 6:14:26 PM9/27/11
to us...@mule.codehaus.org
I am going to turn useJmx="true" . I am assuming it will work then. If
I don't turn that on then how does the broker gets started?

JMX is for monitoring the Broker.
 
Is it done by mule or activemq?

By Spring.

Mohit Anchlia

unread,
Sep 27, 2011, 6:41:06 PM9/27/11
to us...@mule.codehaus.org
Is this start by Spring attempted per application or per mule
instance? Say for instance all I do is import xml file and then do
this in multiple mule applications:

<jms:activemq-connector name="JMSConnector"
maxRedelivery="1" connectionFactory-ref="JMSFactory" />

Would it cause any problems? For eg: Spring trying to start multiple
broker on the same port?

---------------------------------------------------------------------

David Dossot

unread,
Sep 27, 2011, 6:45:33 PM9/27/11
to us...@mule.codehaus.org
Yes, if you import the activemq.xml in several Mule configuration, Spring will try to bootstrap several ActiveMQ brokers.

Mohit Anchlia

unread,
Sep 27, 2011, 6:55:44 PM9/27/11
to us...@mule.codehaus.org
I got activemq-spring and also had to get xbean-spring and now I get:

[09-27 15:53:56] ERROR SpringXmlConfigurationBuilder [main]:
Configuration with
"org.mule.config.spring.SpringXmlConfigurationBuilder" failed.
org.mule.api.lifecycle.InitialisationException: Error creating bean
with name 'JMSConnector': Cannot resolve reference to bean
'JMSFactory' while setting bean property 'connectionFactory'; nested
exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
No bean named 'JMSFactory' is defined


at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:115)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:116)

my activemq is:

http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">

<!-- lets create an embedded ActiveMQ Broker -->

<amq:broker useJmx="false" persistent="false">

<amq:transportConnectors>
<amq:transportConnector uri="tcp://localhost:0" />
</amq:transportConnectors>
</amq:broker>

<!-- ActiveMQ destinations to use -->
<amq:queue id="destination"
physicalName="org.apache.activemq.spring.Test.spring.embedded"/>

<!-- JMS ConnectionFactory to use, configuring the embedded broker
using XML -->
<amq:connectionFactory id="jmsFactory" brokerURL="vm://localhost"/>
</beans>

David Dossot

unread,
Sep 27, 2011, 6:58:44 PM9/27/11
to us...@mule.codehaus.org
I think bean names are case sensitive, no?

Mohit Anchlia

unread,
Sep 27, 2011, 7:05:42 PM9/27/11
to us...@mule.codehaus.org
that did it!! thanks!

Now I am back to my original question and still unsure and don't
understand how it works. How do I reference same connection factory
from multiple mule applications? Just import them and then use it as a
connectionfactory-ref in the connector?

If I turn on JMX would I still be able to see active mq admin console?

Thanks

Mohit Anchlia

unread,
Sep 28, 2011, 1:23:00 PM9/28/11
to us...@mule.codehaus.org
I used same connectionfactory in the jms connector from common jar
activemq.xml in 2 separate applications and it worked fine. I am
wondering how it worked. I would think both applications will try to
start same broker and one of them would fail. Can someone please help
me understand?

Andrew Perepelytsya

unread,
Sep 28, 2011, 1:31:07 PM9/28/11
to us...@mule.codehaus.org

2 embedded brokers would work as long as you use the activemq vm:// url (this is not Mule vm transport,  mind it).  However these are 2 isolated brokers.  Not sure if that's what you want.

Andrew

Mohit Anchlia

unread,
Sep 28, 2011, 1:36:17 PM9/28/11
to us...@mule.codehaus.org
But is it really creating 2 embedded brokers or just sharing one? I am
using same connection factory in both mule application running in same
mule server

David Dossot

unread,
Sep 28, 2011, 1:48:04 PM9/28/11
to us...@mule.codehaus.org
These will be in two different Spring bean factories: you're not using the same connection factory.

Andrew Perepelytsya

unread,
Sep 28, 2011, 1:49:16 PM9/28/11
to us...@mule.codehaus.org

How do you know it's the same? It could be 2 identical declarations which create similar brokers.  Unless you cross the app boundary and use tcp to communicate with the broker.

Andrew

Mohit Anchlia

unread,
Sep 28, 2011, 1:52:15 PM9/28/11
to us...@mule.codehaus.org
I tried turning on useJmx to true and now it fails with this
exception. I even tried removing the second application that is using
same connection factory but didn't make any difference.

INFO 2011-09-28 10:43:55,629 [WrapperListener_start_runner]
org.mule.module.launcher.log4j.ApplicationAwareRepositorySelector:
Logging config jar:file:/C:/temp1/install/mule-standalone-3.1.2/mule-standalone-3.1.2/apps/bridge/lib/datastore.jar!/log4j.properties
is not an external file, will not be monitored for changes
ERROR org.apache.activemq.broker.BrokerService
[WrapperListener_start_runner]: Failed to start ActiveMQ JMS Message
Broker. Reason: javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
at com.sun.jmx.mbeanserver.Repository.addMBean(Unknown Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(Unknown
Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(Unknown Source)
at org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:307)
at org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:54)
at org.apache.activemq.broker.BrokerService.startManagementContext(BrokerService.java:2044)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:474)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)


at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:107)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:116)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:73)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)

at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:57)


at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:80)

at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:236)
at org.mule.module.launcher.application.ApplicationWrapper.init(ApplicationWrapper.java:64)
at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:51)
at org.mule.module.launcher.DeploymentService.start(DeploymentService.java:182)
at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:142)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mule.module.reboot.MuleContainerWrapper.start(MuleContainerWrapper.java:56)
at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
Failed to start ActiveMQ JMS Message Broker. Reason:
javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
at com.sun.jmx.mbeanserver.Repository.addMBean(Unknown Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(Unknown
Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(Unknown Source)
at org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:307)
at org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:54)
at org.apache.activemq.broker.BrokerService.startManagementContext(BrokerService.java:2044)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:474)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)


at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:107)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:116)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:73)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)

at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:57)


at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:80)

at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:236)
at org.mule.module.launcher.application.ApplicationWrapper.init(ApplicationWrapper.java:64)
at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:51)
at org.mule.module.launcher.DeploymentService.start(DeploymentService.java:182)
at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:142)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mule.module.reboot.MuleContainerWrapper.start(MuleContainerWrapper.java:56)
at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
WARN org.apache.activemq.broker.jmx.ManagementContext [JMX
connector]: Failed to start jmx connector: Cannot bind to URL
[rmi://localhost:1099/jmxrmi]: javax.naming.NameAlreadyBoundException:
jmxrmi [Root exception is java.rmi.AlreadyBoundException: jmxrmi]
Failed to start jmx connector: Cannot bind to URL
[rmi://localhost:1099/jmxrmi]: javax.naming.NameAlreadyBoundException:
jmxrmi [Root exception is java.rmi.AlreadyBoundException: jmxrmi]
ERROR org.mule.config.spring.SpringXmlConfigurationBuilder
[WrapperListener_start_runner]: Configuration with


"org.mule.config.spring.SpringXmlConfigurationBuilder" failed.
org.mule.api.lifecycle.InitialisationException: Error creating bean

with name '.:broker' defined in class path resource
[jms/active-mq.xml]: Invocation of init method failed; nested
exception is javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker


at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:115)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:116)

at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:73)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)

at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:57)


at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:80)

at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:236)
at org.mule.module.launcher.application.ApplicationWrapper.init(ApplicationWrapper.java:64)
at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:51)
at org.mule.module.launcher.DeploymentService.start(DeploymentService.java:182)
at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:142)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mule.module.reboot.MuleContainerWrapper.start(MuleContainerWrapper.java:56)
at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name '.:broker' defined in class path
resource [jms/active-mq.xml]: Invocation of init method failed; nested
exception is javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)


at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:107)

... 20 more
Caused by: javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
at com.sun.jmx.mbeanserver.Repository.addMBean(Unknown Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(Unknown
Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(Unknown Source)
at org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:307)
at org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:54)
at org.apache.activemq.broker.BrokerService.startManagementContext(BrokerService.java:2044)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:474)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 31 more


Configuration with
"org.mule.config.spring.SpringXmlConfigurationBuilder" failed.
org.mule.api.lifecycle.InitialisationException: Error creating bean

with name '.:broker' defined in class path resource
[jms/active-mq.xml]: Invocation of init method failed; nested
exception is javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker


at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:115)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:116)

at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:73)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)

at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:57)


at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:80)

at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:236)
at org.mule.module.launcher.application.ApplicationWrapper.init(ApplicationWrapper.java:64)
at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:51)
at org.mule.module.launcher.DeploymentService.start(DeploymentService.java:182)
at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:142)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mule.module.reboot.MuleContainerWrapper.start(MuleContainerWrapper.java:56)
at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name '.:broker' defined in class path
resource [jms/active-mq.xml]: Invocation of init method failed; nested
exception is javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)


at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:107)

... 20 more
Caused by: javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
at com.sun.jmx.mbeanserver.Repository.addMBean(Unknown Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(Unknown
Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(Unknown Source)
at org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:307)
at org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:54)
at org.apache.activemq.broker.BrokerService.startManagementContext(BrokerService.java:2044)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:474)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 31 more
ERROR org.mule.config.builders.AutoConfigurationBuilder
[WrapperListener_start_runner]: Configuration with
"org.mule.config.builders.AutoConfigurationBuilder" failed.
org.mule.api.config.ConfigurationException: Error creating bean with
name '.:broker' defined in class path resource [jms/active-mq.xml]:
Invocation of init method failed; nested exception is
javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
(org.mule.api.lifecycle.InitialisationException)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:54)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:57)


at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:80)

at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:236)
at org.mule.module.launcher.application.ApplicationWrapper.init(ApplicationWrapper.java:64)
at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:51)
at org.mule.module.launcher.DeploymentService.start(DeploymentService.java:182)
at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:142)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mule.module.reboot.MuleContainerWrapper.start(MuleContainerWrapper.java:56)
at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
Caused by: org.mule.api.lifecycle.InitialisationException: Error
creating bean with name '.:broker' defined in class path resource
[jms/active-mq.xml]: Invocation of init method failed; nested
exception is javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker


at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:115)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:116)

at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:73)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)

... 17 more
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name '.:broker' defined in class path
resource [jms/active-mq.xml]: Invocation of init method failed; nested
exception is javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)


at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:107)

... 20 more
Caused by: javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
at com.sun.jmx.mbeanserver.Repository.addMBean(Unknown Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(Unknown
Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(Unknown Source)
at org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:307)
at org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:54)
at org.apache.activemq.broker.BrokerService.startManagementContext(BrokerService.java:2044)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:474)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 31 more
Configuration with "org.mule.config.builders.AutoConfigurationBuilder" failed.
org.mule.api.config.ConfigurationException: Error creating bean with
name '.:broker' defined in class path resource [jms/active-mq.xml]:
Invocation of init method failed; nested exception is
javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
(org.mule.api.lifecycle.InitialisationException)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:54)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:57)


at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:80)

at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:236)
at org.mule.module.launcher.application.ApplicationWrapper.init(ApplicationWrapper.java:64)
at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:51)
at org.mule.module.launcher.DeploymentService.start(DeploymentService.java:182)
at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:142)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mule.module.reboot.MuleContainerWrapper.start(MuleContainerWrapper.java:56)
at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
Caused by: org.mule.api.lifecycle.InitialisationException: Error
creating bean with name '.:broker' defined in class path resource
[jms/active-mq.xml]: Invocation of init method failed; nested
exception is javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker


at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:115)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:116)

at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:73)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)

... 17 more
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name '.:broker' defined in class path
resource [jms/active-mq.xml]: Invocation of init method failed; nested
exception is javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)


at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:107)

... 20 more
Caused by: javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
at com.sun.jmx.mbeanserver.Repository.addMBean(Unknown Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(Unknown
Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(Unknown Source)
at org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:307)
at org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:54)
at org.apache.activemq.broker.BrokerService.startManagementContext(BrokerService.java:2044)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:474)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 31 more
ERROR org.mule.module.launcher.application.DefaultMuleApplication
[WrapperListener_start_runner]: null
javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
at com.sun.jmx.mbeanserver.Repository.addMBean(Unknown Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(Unknown
Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(Unknown Source)
at org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:307)
at org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:54)
at org.apache.activemq.broker.BrokerService.startManagementContext(BrokerService.java:2044)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:474)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)


at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:107)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:116)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:73)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)

at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:57)


at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:47)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:80)

at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:236)
at org.mule.module.launcher.application.ApplicationWrapper.init(ApplicationWrapper.java:64)
at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:51)
at org.mule.module.launcher.DeploymentService.start(DeploymentService.java:182)
at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:142)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mule.module.reboot.MuleContainerWrapper.start(MuleContainerWrapper.java:56)
at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
null
javax.management.InstanceAlreadyExistsException:
org.apache.activemq:BrokerName=localhost,Type=Broker
at com.sun.jmx.mbeanserver.Repository.addMBean(Unknown Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(Unknown
Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(Unknown
Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(Unknown Source)
at org.apache.activemq.broker.jmx.ManagementContext.registerMBean(ManagementContext.java:307)
at org.apache.activemq.broker.jmx.AnnotatedMBean.registerMBean(AnnotatedMBean.java:54)
at org.apache.activemq.broker.BrokerService.startManagementContext(BrokerService.java:2044)
at org.apache.activemq.broker.BrokerService.start(BrokerService.java:474)
at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)


On Wed, Sep 28, 2011 at 10:49 AM, Andrew Perepelytsya

Andrew Perepelytsya

unread,
Sep 28, 2011, 1:58:55 PM9/28/11
to us...@mule.codehaus.org

I can see that 1. Activemq doesn't put mbeans under different domains for each application.  Not sure if it's possible to customize it on the end. 2. Two instances of a broker are being started,  which is probably not what you wanted.

Andrew

David Dossot

unread,
Sep 28, 2011, 1:58:46 PM9/28/11
to us...@mule.codehaus.org
You're probably starting several brokers with the same name in the same JVM and they all try to register the same MBeans.

Mohit Anchlia

unread,
Sep 28, 2011, 2:01:00 PM9/28/11
to us...@mule.codehaus.org
Correct but not sure where it's doing that. Since I removed other apps
that were referencing that factory.

My activemq resides in the jar file and I use spring import to import
the resource. Does mule also try to create another broker?

On Wed, Sep 28, 2011 at 10:58 AM, Andrew Perepelytsya

Mohit Anchlia

unread,
Sep 28, 2011, 2:07:05 PM9/28/11
to us...@mule.codehaus.org
Not sure where I am starting it. I only got this error when I turned
on useJmx=true. Isn't broker started with it's false?

I only have this in one mule app and activmq config is in common jar
file. I undeployed other jars:


<spring:beans>
<spring:import resource="classpath:jms/active-mq.xml" />
</spring:beans>

Mohit Anchlia

unread,
Sep 28, 2011, 2:46:05 PM9/28/11
to us...@mule.codehaus.org
Sending this message again with reduced size:

I am wondering what is that I am doing wrong. I also see already bind
exception on 1099. I only have one application importing activemq from
a jar file. I am attaching the mule log in case someone has time to
look at it :)

I don't see any other process on 1099 port in netstat. Perhaps it's
within mule that is causing conflict.

On Wed, Sep 28, 2011 at 11:41 AM, Mohit Anchlia <mohita...@gmail.com> wrote:
> I am wondering what is that I am doing wrong. I also see already bind
> exception on 1099. I only have one application importing activemq from
> a jar file. I am attaching the mule log in case someone has time to
> look at it :)
>
> I don't see any other process on 1099 port in netstat. Perhaps it's
> within mule that is causing conflict.

Copy of mule.log

Mohit Anchlia

unread,
Sep 28, 2011, 7:20:33 PM9/28/11
to us...@mule.codehaus.org
I now separated my activemq files. Everything seems to work. I can
also see brokers in jmx . I also have turned useJmx to false But I
can't get rid of the following message:

WARN org.apache.activemq.broker.jmx.ManagementContext [JMX
connector]: Failed to start jmx connector: Cannot bind to URL
[rmi://localhost:1099/jmxrmi]: javax.naming.NameAlreadyBoundException:
jmxrmi [Root exception is java.rmi.AlreadyBoundException: jmxrmi]
Failed to start jmx connector: Cannot bind to URL
[rmi://localhost:1099/jmxrmi]: javax.naming.NameAlreadyBoundException:
jmxrmi [Root exception is java.rmi.AlreadyBoundException: jmxrmi]
WARN org.apache.activemq.broker.jmx.ManagementContext [JMX
connector]: Failed to start jmx connector: Cannot bind to URL
[rmi://localhost:1099/jmxrmi]: javax.naming.NameAlreadyBoundException:
jmxrmi [Root exception is java.rmi.AlreadyBoundException: jmxrmi]
Failed to start jmx connector: Cannot bind to URL
[rmi://localhost:1099/jmxrmi]: javax.naming.NameAlreadyBoundException:
jmxrmi [Root exception is java.rmi.AlreadyBoundException: jmxrmi]

Reply all
Reply to author
Forward
0 new messages