[mule-user] java.lang.IllegalStateException: There are at least 2 connectors matching protocol "jms"

2 views
Skip to first unread message

lchaparala

unread,
Jun 28, 2007, 12:35:03 PM6/28/07
to us...@mule.codehaus.org

Hi,
I am using mule 1.4.1 version. I have 2 JMSConnectors, 1 is a Weblogic JMS
connector and the other is a ActiveMQ JMS connector.
My configuration looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mule-configuration PUBLIC "-//SymphonySoft //DTD
mule-configuration XML V1.0//EN"

"http://www.symphonysoft.com/dtds/mule/mule-configuration.dtd">
<mule-configuration id="Common" version="1.0">
<mule-environment-properties synchronous="false"
serverUrl="tcp://localhost:60504"/>

<!-- **************************************** Connectors
**************************************** -->
<!-- Weblogic connector -->
<connector name="GatewayJMSConnector"
className="com.issinc.esb.common.connector.JmsConnector">
<properties>
<property name="specification" value="1.1"/>
<property name="jndiDestinations" value="true"/>
<property name="forceJndiDestinations" value="true"/>
<property name="connectionFactoryJndiName"
value="weblogic.jms.ConnectionFactory"/>
<property name="jndiInitialFactory"
value="weblogic.jndi.WLInitialContextFactory"/>
<property name="jndiProviderUrl"
value="t3://localhost:7001"/>
<map name="jndiProviderProperties">
<property name="java.naming.security.principal" value=""/>
<property name="java.naming.security.credentials"
value=""/>
</map>
</properties>
<connection-strategy
className="org.mule.providers.SimpleRetryConnectionStrategy">
<properties>
<property name="retryCount" value="9999999"/>
<property name="frequency" value="10000"/>
</properties>
</connection-strategy>
</connector>
<connector name="ActiveMQJmsConnector"
className="org.mule.providers.jms.JmsConnector"> <properties>
<property name="specification" value="1.1"/>
<property name="connectionFactoryJndiName" value="ConnectionFactory"/>
<property name="jndiInitialFactory"
value="org.activemq.jndi.ActiveMQInitialContextFactory"/>
<property name="maxRedelivery" value="1"/>
<map name="connectionFactoryProperties">
<property name="brokerURL" value="vm://activemq"/>
<property name="brokerXmlConfig" value="file:../conf/activemq.xml"/>
</map>
</properties>
</connector>
<global-endpoints>
<endpoint name="JmsInbound"
address="jms://com/issinc/webtas/queue/Dispatch?connector=GatewayJMSConnector"
transformers="JMSMessageToObject"/>
<endpoint name="activeMQOutbound"
address="jms://topic:notification?connector=ActiveMQJmsConnector"/>
<endpoint name="submit"
address="jms://topic:submit?connector=ActiveMQJmsConnector"
transformers="JMSMessageToObject ObjectToString GroundTrackToObjectXslt
StringToJmsMessage"/>
</global-endpoints>

<!-- **************************************** Descriptors/Services
**************************************** -->

<model name="COMMON">
<!-- *** Dispatch Component ***
Accepts messages via JMS topic, and dispatches via specified
endpoint
-->
<mule-descriptor name="Dispatch"
implementation="esb.common.component.DispatchUMO">
<!-- Inbound endpoints -->
<inbound-router>
<global-endpoint name="JmsInbound"/>
</inbound-router>
<!-- Outbound endpoints -->
<!-- dynamically determined -->
</mule-descriptor>
<!-- Bridge component to bridge between two different JMS
connectors. -->
<mule-descriptor name="jmsBridgeComponent"
implementation="org.mule.components.simple.BridgeComponent">
<inbound-router>
<global-endpoint name="JmsInbound"/>
</inbound-router>
<outbound-router>
<router
className="org.mule.routing.outbound.OutboundPassThroughRouter">
<global-endpoint name="activeMQOutbound"/>
</router>
</outbound-router>
</mule-descriptor>
<mule-descriptor name="UAIMSubmitUMO"
implementation="com.issinc.esb.atdf.UAIMSubmitUMO">
<inbound-router>
<global-endpoint name="activeMQOutbound"/>
</inbound-router>
<outbound-router>
<router className="org.mule.routing.outbound.FilteringOutboundRouter">
<global-endpoint name="uaimSubmit"/>
</router>
</outbound-router>
</mule-descriptor>
</model>
Before the message gets dispatched to submit topic I get the following
exceptions. On second run my test passes and a message is published to
submit topic.

org.mule.umo.ComponentException: Failed to invoke
esb.common.component.DispatchUMO. Component that caused exception is:
Dispatch. Message payload is of type: TextMessageImpl at
org.mule.impl.DefaultLifecycleAdapter.intercept(DefaultLifecycleAdapter.java:200)
at org.mule.impl.InterceptorsInvoker.execute(InterceptorsInvoker.java:47)
at org.mule.impl.model.DefaultMuleProxy.run(DefaultMuleProxy.java:466)
at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.mule.providers.service.TransportFactoryException: There are
at least 2 connectors matching protocol "jms", so the connector to use must
be specified on the endpoint using the 'connector' property/attribute
(java.lang.IllegalStateException)
at
org.mule.providers.service.TransportFactory.createEndpoint(TransportFactory.java:111)
at
org.mule.impl.ImmutableMuleEndpoint.createEndpointFromUri(ImmutableMuleEndpoint.java:563)
at
org.mule.impl.ImmutableMuleEndpoint.getOrCreateEndpointForUri(ImmutableMuleEndpoint.java:628)
at
org.mule.impl.ImmutableMuleEndpoint.<init>(ImmutableMuleEndpoint.java:232)
at org.mule.impl.endpoint.MuleEndpoint.<init>(MuleEndpoint.java:72)
at com.issinc.esb.common.component.DispatchUMO.onCall(DispatchUMO.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.mule.impl.model.resolvers.DynamicEntryPoint.invokeMethod(DynamicEntryPoint.java:313)
at
org.mule.impl.model.resolvers.DynamicEntryPoint.invoke(DynamicEntryPoint.java:260)
at
org.mule.impl.DefaultLifecycleAdapter.intercept(DefaultLifecycleAdapter.java:194)
... 6 more
Caused by: java.lang.IllegalStateException: There are at least 2 connectors
matching protocol "jms", so the connector to use must be specified on the
endpoint using the 'connector' property/attribute
at
org.mule.providers.service.TransportFactory.getConnectorByProtocol(TransportFactory.java:436)
at
org.mule.providers.service.TransportFactory.createEndpoint(TransportFactory.java:101)
... 18 more

Is there something I am missing in the config or the UMO? I tried a patch as
per JIRA MULE-1665, that didn't seem to resolve it.

Thanks

Lakshmi
ISS Inc

--
View this message in context: http://www.nabble.com/java.lang.IllegalStateException%3A-There-are-at-least-2-connectors-matching-protocol-%22jms%22-tf3995379.html#a11346544
Sent from the Mule - User mailing list archive at Nabble.com.


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

http://xircles.codehaus.org/manage_email

Andrew Perepelytsya

unread,
Jun 28, 2007, 12:41:26 PM6/28/07
to us...@mule.codehaus.org
Try the connectorName attribute on the URI, not the connector.

Andrew

On 6/28/07, lchaparala <lakshmi....@issinc.com > wrote:


lchaparala

unread,
Jun 28, 2007, 1:35:15 PM6/28/07
to us...@mule.codehaus.org

I was able to use connectotName attribute on URI. Earlier I sent an email to
you saying ESB would not start with connectorName attribute in URI. My bad,
it did start but did not resolve the issue. I still get:
java.lang.IllegalStateException: There are at least 2 connectors matching
protocol "jms", so the connector to use must be specified on the endpoint
using the 'connector' property/attribute

On second try, my JUnit will send a message to the endpoint. Not sure if the
above exception means anything at all as it seems to work on second try :)

Thanks
Lakshmi

--
View this message in context: http://www.nabble.com/java.lang.IllegalStateException%3A-There-are-at-least-2-connectors-matching-protocol-%22jms%22-tf3995379.html#a11347236

Reply all
Reply to author
Forward
0 new messages