« Return to Thread: JMS exceptions in Mule 2.2.1

Re: JMS exceptions in Mule 2.2.1

by ron.fulkerson :: Rate this Message:

Reply to Author | View in Thread

Hi,

This works, thank you!  It was immensely helpful to have a working
example to test configuration changes against, etc..  Doing so allowed
me to eventually track down the final issue that was preventing me from
progressing - one small bug.

The <reply-to> tag must be used with an address attribute.  Using a ref
attribute works with queues, but does not work with topics.  Topics in a
reply-to ref tag cause a ClassCastException (pasted below with config).  
I also tested this in 2.1.2 and had the same results.  Do you want a
jira filed for this issue?

Fortunately this is easy enough to work around, and I am now enjoying
Mule 2.2.1!

Thanks again for all the help,
Ron

ERROR 2009-07-02 15:57:59,247 [jmsConnector.dispatcher.1]
org.mule.DefaultExceptionStrategy: Caught exception in Exception
Strategy: org.apache.activemq.ActiveMQTopicSession cannot be cast to
javax.jms.QueueSession
java.lang.ClassCastException: org.apache.activemq.ActiveMQTopicSession
cannot be cast to javax.jms.QueueSession
        at
org.mule.transport.jms.Jms102bSupport.createDestination(Jms102bSupport.java:219)
        at
org.mule.transport.jms.JmsMessageDispatcher.getReplyToDestination(JmsMessageDispatcher.java:477)
        at
org.mule.transport.jms.JmsMessageDispatcher.dispatchMessage(JmsMessageDispatcher.java:171)
        at
org.mule.transport.jms.JmsMessageDispatcher.doDispatch(JmsMessageDispatcher.java:73)
        at
org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:262)
        at org.mule.work.WorkerContext.run(WorkerContext.java:310)

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:spring="http://www.springframework.org/schema/beans"
    xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.2"
    xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.2"
    xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.2"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    http://www.mulesource.org/schema/mule/core/2.2 
http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
    http://www.mulesource.org/schema/mule/jms/2.2 
http://www.mulesource.org/schema/mule/jms/2.2/mule-jms.xsd
    http://www.mulesource.org/schema/mule/stdio/2.2 
http://www.mulesource.org/schema/mule/stdio/2.2/mule-stdio.xsd
    http://www.mulesource.org/schema/mule/vm/2.2 
http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd
    http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context-2.5.xsd">
   
    <jms:activemq-connector name="jmsConnector"
brokerURL="tcp://localhost:4101"
disableTemporaryReplyToDestinations="true"/>

    <stdio:connector name="SystemStreamConnector" promptMessage="Please
enter something:" messageDelayTime="1000" />
   
    <jms:endpoint name="RequestRef" topic="request"
connector-ref="jmsConnector"/>
    <jms:endpoint name="ReplyRef" topic="reply"
connector-ref="jmsConnector"/>
   
    <model name="jms-test-suite">
               
        <service name="EchoUMO">
            <inbound>
                <stdio:inbound-endpoint system="IN"/>
            </inbound>
            <outbound>
                <chaining-router>
                    <vm:outbound-endpoint path="echo" synchronous="true" />
                    <stdio:outbound-endpoint system="OUT"
synchronous="false" />
                </chaining-router>
            </outbound>
        </service>
       
        <service name="Requester">
            <inbound>
                <vm:inbound-endpoint path="echo" synchronous="true"/>
            </inbound>
            <outbound>
                <chaining-router>
                    <outbound-endpoint ref="RequestRef" synchronous="true"/>
                    <reply-to ref="ReplyRef"/>
                </chaining-router>
            </outbound>
            <async-reply timeout="10000" failOnTimeout="true">
                <inbound-endpoint ref="ReplyRef"/>
                <single-async-reply-router/>
            </async-reply>
        </service>

        <service name="Replier">
            <inbound>
                <inbound-endpoint ref="RequestRef" synchronous="true"/>
            </inbound>
            <echo-component />
        </service>
    </model>

</mule>


Puneet Gupta wrote:

> I tested the below config in 2.2.1-EE and it worked fine. The log shows that the reply was sent to the correct replyTo destination
>
> *****************
> Please enter something:
> hello
> INFO  2009-07-02 13:09:33,216 [EchoUMO.2] org.mule.transport.vm.VMMessageDispatc
> her: Connected: endpoint.outbound.vm://echo
> INFO  2009-07-02 13:09:33,229 [jmsConnector.dispatcher.1] com.mulesource.mule.tr
> ansport.jms.EeJmsMessageDispatcher: Connected: endpoint.outbound.jms://RequestQueue
> INFO  2009-07-02 13:09:33,269 [ActiveMQ Session Task] org.mule.transport.jms.Jms
> ReplyToHandler: Reply Message sent to: queue://ReplyQueue with correlationID:421
> 6f05e-6744-11de-8f0c-3b9c8e1bf4e7
> INFO  2009-07-02 13:09:33,287 [SystemStreamConnector.dispatcher.1] org.mule.tran
> sport.stdio.StdioMessageDispatcher: Connected: endpoint.outbound.stdio://system.out
> hello
> ******************
>
> <?xml version="1.0" encoding="UTF-8"?>
> <mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xmlns:spring="http://www.springframework.org/schema/beans"
>     xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.2"
>     xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.2"
>     xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.2"
>     xmlns:context="http://www.springframework.org/schema/context"
>     xsi:schemaLocation="
>     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>     http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
>     http://www.mulesource.org/schema/mule/jms/2.2 http://www.mulesource.org/schema/mule/jms/2.2/mule-jms.xsd
>     http://www.mulesource.org/schema/mule/stdio/2.2 http://www.mulesource.org/schema/mule/stdio/2.2/mule-stdio.xsd
>     http://www.mulesource.org/schema/mule/vm/2.2 http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd
>     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
>    
>     <jms:activemq-connector name="jmsConnector" brokerURL="tcp://localhost:61616"/>
>
>     <stdio:connector name="SystemStreamConnector" promptMessage="Please enter something:" messageDelayTime="1000" />
>    
>     <model name="jms-test-suite">
>                
>         <service name="EchoUMO">
>             <inbound>
>                 <stdio:inbound-endpoint system="IN"/>
>             </inbound>
>             <outbound>
>                 <chaining-router>
>                     <vm:outbound-endpoint path="echo" synchronous="true" />
>                     <stdio:outbound-endpoint system="OUT" synchronous="false" />
>                 </chaining-router>
>             </outbound>
>         </service>
>        
>         <service name="Requester">
>             <inbound>
>                 <vm:inbound-endpoint path="echo" synchronous="true"/>
>             </inbound>
>             <outbound>
>                 <chaining-router>
>                     <jms:outbound-endpoint queue="RequestQueue" synchronous="true"/>
>                     <reply-to address="jms://ReplyQueue"/>
>                 </chaining-router>
>             </outbound>
>             <async-reply timeout="10000" failOnTimeout="true">
>                 <jms:inbound-endpoint queue="ReplyQueue"/>
>                 <single-async-reply-router/>
>             </async-reply>
>         </service>
>
>         <service name="Replier">
>             <inbound>
>                 <jms:inbound-endpoint queue="RequestQueue" synchronous="true"/>
>             </inbound>
>         </service>
>     </model>
>    
>    
> </mule>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>  

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

    http://xircles.codehaus.org/manage_email


 « Return to Thread: JMS exceptions in Mule 2.2.1