ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ-JMS issue... Please help

Post new topic  Reply to topic
 MQ-JMS issue... Please help « View previous topic :: View next topic » 
Author Message
BDB
PostPosted: Mon Jan 26, 2009 10:01 am    Post subject: MQ-JMS issue... Please help Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Jan 26, 2009 10:09 am    Post subject: Re: MQ-JMS issue... Please help Reply with quote

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
View user's profile Send private message
BDB
PostPosted: Mon Jan 26, 2009 10:23 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Jan 26, 2009 12:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
BDB
PostPosted: Mon Jan 26, 2009 12:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Mon Jan 26, 2009 12:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Jan 26, 2009 2:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Jan 26, 2009 3:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Jan 26, 2009 7:17 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ-JMS issue... Please help
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.