Author |
Message
|
BDB |
Posted: Mon Jan 26, 2009 10:01 am Post subject: MQ-JMS issue... Please help |
|
|
Apprentice
Joined: 06 Jan 2009 Posts: 28
|
Hello Experts.....
Please help me identify the mistake if you can.
I have a problem. I am creating and setting a message in a queue with the following code snippet.
MQMessage hello_world = new MQMessage();
hello_world.format = MQC.MQFMT_STRING;
hello_world.replyToQueueName="MQResponseQueue";
hello_world.replyToQueueManagerName="MQTest";
I have the JMS configured in WL10 server. When I get the above message in my MDB, I am getting the following exception..can you please help and let me know what information I am missing? I thought the ReplyTo infor is missing since it complains about the destination but it is set in the messsage.. Please help
<Jan 26, 2009 12:59:18 PM EST> <Warning> <EJB> <BEA-010065> <MessageDrivenBean threw an Exception in
onMessage(). The exception was:
java.lang.UnsupportedOperationException: [JMSClientExceptions:055079]Must provide destination to send to.
java.lang.UnsupportedOperationException: [JMSClientExceptions:055079]Must provide destination to send to at weblogic.jms.client.JMSProducer.send(JMSProducer.java:341)
at weblogic.jms.client.WLProducerImpl.send(WLProducerImpl.java:966)
at com.ee.dc.jms.JMSResponseHandler.onMessage(JMSResponseHandler.java:89)
at sun.reflect.GeneratedMethodAccessor576.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
on(AopUtils.java:281)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
inpoint(ReflectiveMethodInvocation.java:187)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:154)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doP
roceed(DelegatingIntroductionInterceptor.java:126)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.inv
oke(DelegatingIntroductionInterceptor.java:114)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invok
e(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doP
roceed(DelegatingIntroductionInterceptor.java:126)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.inv
oke(DelegatingIntroductionInterceptor.java:114)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:210)
at $Proxy87.onMessage(Unknown Source)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4072)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:3964)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4490)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.jav
a:464)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Regards
-BDB 
Last edited by BDB on Mon Jan 26, 2009 1:02 pm; edited 1 time in total |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jan 26, 2009 10:09 am Post subject: Re: MQ-JMS issue... Please help |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
BDB wrote: |
let me know what information I am missing? I thought the ReplyTo infor is missing since it complains about the destination but it is set in the messsage |
You've set the reply to queue. Where is the message to be written out to before it comes back? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
BDB |
Posted: Mon Jan 26, 2009 10:23 am Post subject: |
|
|
Apprentice
Joined: 06 Jan 2009 Posts: 28
|
MQ Server sits on a remote machine. On the remote machine, I run my Java code to put messages in the queue. My WL server (on my local machine) reads that message via message bridge and throwing that error. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jan 26, 2009 12:10 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
BDB wrote: |
I run my Java code to put messages in the queue. |
And as I said in my previous post, the snippet you've posted gives no indication of how you're identifying that queue (the destination of the put message). _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
BDB |
Posted: Mon Jan 26, 2009 12:18 pm Post subject: |
|
|
Apprentice
Joined: 06 Jan 2009 Posts: 28
|
Oops...sorry fornot posting all my code..here it is....
MQQueueManager qMgr = new MQQueueManager(qManager);
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT ;
MQQueue system_default_local_queue = qMgr.accessQueue("MQResponseQueue",openOptions);
MQMessage hello_world = new MQMessage();
hello_world.format = MQC.MQFMT_STRING;
hello_world.replyToQueueName="MQResponseQueue";
hello_world.writeString="Test Message";
MQPutMessageOptions pmo = new MQPutMessageOptions();
system_default_local_queue.putReplyMessage(hello_world,pmo);
system_default_local_queue.close();
qMgr.disconnect();
Quote: |
And as I said in my previous post, the snippet you've posted gives no indication of how you're identifying that queue (the destination of the put message). |
|
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jan 26, 2009 12:45 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
No.
That is the wrong code, because it is not the JMS code that is throwing the error, because it is not JMS code at all.
You want the code
Quote: |
at com.ee.dc.jms.JMSResponseHandler.onMessage(JMSResponseHandler.java:89) |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jan 26, 2009 2:13 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqjeff wrote: |
No.
That is the wrong code, because it is not the JMS code that is throwing the error, because it is not JMS code at all.
You want the code
Quote: |
at com.ee.dc.jms.JMSResponseHandler.onMessage(JMSResponseHandler.java:89) |
|
Jeff, its the right code because that's the code that is producing the error. The JMS code is just stating the obvious. The replyto information is not filled in right on the request message. In fact he did not even specify the message to be a request message.
If this is an attempt at creating java base code by abstracting from JMS you need to know that JMS does a number of things for you behind the scenes, especially regarding to a reply to destination .... and message type etc... In java base you will have to do them yourself.
I suggest you revisit the java base request reply sample and compare it to what you are doing.... Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jan 26, 2009 3:56 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
It *might* be the right code.
Or it could be that the JMS code that he didn't show is *also* wrong. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jan 26, 2009 7:17 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqjeff wrote: |
It *might* be the right code.
Or it could be that the JMS code that he didn't show is *also* wrong. |
I stand corrected.... Indeed there is nothing to say that his JMS code is any good ...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|