Announcement Announcement Module
Collapse
No announcement yet.
MessageListenerAdapter -error on replying Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • MessageListenerAdapter -error on replying

    I'm trying to use the MessageListenerAdapter to receive a message and respond using a delegate class as in the Spring example (on Weblogic 9.2).

    The jms server that the reply is going back to is in a different cluster.

    However I get a stack trace like the following:

    Code:
    1515281 [DefaultMessageListenerContainer-1] ERROR: listener.DefaultMessageListen
    erContainer - Execution of JMS message listener failed
    weblogic.jms.common.JMSException: Error producing message for destination System
    Module-1!jms/responseQ
            at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThr
    ow(DispatcherAdapter.java:110)
            at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(Dispatch
    erAdapter.java:61)
            at weblogic.jms.client.JMSProducer.toFEProducer(JMSProducer.java:1061)
            at weblogic.jms.client.JMSProducer.deliveryInternal(JMSProducer.java:670
    )
            at weblogic.jms.client.JMSProducer.sendInternal(JMSProducer.java:455)
            at weblogic.jms.client.JMSProducer.send(JMSProducer.java:337)
            at weblogic.jms.client.WLProducerImpl.send(WLProducerImpl.java:966)
            at org.springframework.jms.listener.adapter.MessageListenerAdapter.sendR
    esponse(MessageListenerAdapter.java:436)
            at org.springframework.jms.listener.adapter.MessageListenerAdapter.handl
    eResult(MessageListenerAdapter.java:349)
            at org.springframework.jms.listener.adapter.MessageListenerAdapter.onMes
    sage(MessageListenerAdapter.java:236)
            at org.springframework.jms.listener.AbstractMessageListenerContainer.inv
    okeListener(AbstractMessageListenerContainer.java:555)
            at org.springframework.jms.listener.AbstractMessageListenerContainer.inv
    okeListener(AbstractMessageListenerContainer.java:511)
            at org.springframework.jms.listener.AbstractMessageListenerContainer.doE
    xecuteListener(AbstractMessageListenerContainer.java:483)
            at org.springframework.jms.listener.AbstractMessageListenerContainer.exe
    cuteListener(AbstractMessageListenerContainer.java:463)
            at org.springframework.jms.listener.DefaultMessageListenerContainer.exec
    uteListener(DefaultMessageListenerContainer.java:359)
            at org.springframework.jms.listener.DefaultMessageListenerContainer$Asyn
    cMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:515)
            at org.springframework.jms.listener.DefaultMessageListenerContainer$Asyn
    cMessageListenerInvoker.run(DefaultMessageListenerContainer.java:486)
            at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThro
    ttlingRunnable.run(SimpleAsyncTaskExecutor.java:203)
            at java.lang.Thread.run(Thread.java:595)
    Caused by: weblogic.jms.common.JMSException: Error producing message for destina
    tion SystemModule-1!jms/responseQ
            at weblogic.jms.dispatcher.Request.handleThrowable(Request.java:63)
            at weblogic.jms.dispatcher.Request.getResult(Request.java:51)
            at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Reque
    st.java:895)
            at weblogic.messaging.dispatcher.DispatcherImpl.dispatchSyncNoTran(Dispa
    tcherImpl.java:246)
            at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(Dispatch
    erAdapter.java:59)
            ... 17 more
    Caused by: weblogic.jms.common.JMSException: Error producing message for destina
    tion SystemModule-1!jms/responseQ
            at weblogic.jms.frontend.FEProducer.findDispatcher(FEProducer.java:816)
            at weblogic.jms.frontend.FEProducer.sendSingleDestination(FEProducer.jav
    a:1142)
            at weblogic.jms.frontend.FEProducer.send(FEProducer.java:1360)
            at weblogic.jms.frontend.FEProducer.invoke(FEProducer.java:1419)
            at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Reque
    st.java:759)
            ... 19 more
    Caused by: weblogic.messaging.dispatcher.DispatcherException: could not find Ser
    ver wcss1
            at weblogic.messaging.dispatcher.DispatcherManager.dispatcherCreate(Disp
    atcherManager.java:174)
            at weblogic.messaging.dispatcher.DispatcherManager.dispatcherFindOrCreat
    e(DispatcherManager.java:58)
            at weblogic.jms.dispatcher.JMSDispatcherManager.dispatcherFindOrCreate(J
    MSDispatcherManager.java:200)
            at weblogic.jms.dispatcher.JMSDispatcherManager.dispatcherFindOrCreateCh
    ecked(JMSDispatcherManager.java:211)
            at weblogic.jms.frontend.FEProducer.findDispatcher(FEProducer.java:810)
            ... 23 more
    Caused by: javax.naming.NameNotFoundException: Unable to resolve 'weblogic.messaging.dispatcher.S:wcss1'. Resolved 'weblogic.messaging.dispatcher'; remaining name 'S:wcss1'
            at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
    NamingNode.java:1139)
            at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.jav
    a:252)
            at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.j
    ava:171)
            at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:20
    6)
            at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:21
    4)
            at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:21
    4)
            at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:21
    4)
            at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.j
    ava:269)
            at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:362)
            at javax.naming.InitialContext.lookup(InitialContext.java:351)
            at weblogic.messaging.dispatcher.DispatcherManager.dispatcherCreate(Disp
    atcherManager.java:170)
            ... 27 more
    I have carried out a test to see if I can write a message on the response queue using JMSTemplate and that worked fine proving the queue is correct.

  • #2
    I found the issue. When replying to a message, the lookup of the destination is done using the jndi tree for the connection factory used to receive this message. Therefore for remote locations, it will fail.

    Therefore it brings me to my next question. Is there way to reply using a different connection factory from within the onMessage?

    It would be nice if Spring could make this easy to do rather than having to do this manually

    Comment

    Working...
    X