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 Installation/Configuration Support » MQ Series Error Code : 2045

Post new topic  Reply to topic
 MQ Series Error Code : 2045 « View previous topic :: View next topic » 
Author Message
Praveen
PostPosted: Thu Nov 07, 2002 12:19 am    Post subject: MQ Series Error Code : 2045 Reply with quote

Apprentice

Joined: 23 Oct 2002
Posts: 40
Location: Bangalore

Hi All,
I am trying to run a java program which is sending a message to server and getting it back. But I am getting this error code 2045 which is related to "openOptions", this is what I had specified
********************************************************
int openOptions = MQC.MQOO_OUTPUT | MQC.MQOO_SET | MQC.MQOO_INPUT_EXCLUSIVE

MQQueue system_default_local_queue = qMgr.accessQueue("LOCAL.DEF.OF.REMOTE.QUEUE", openOptions);
********************************************************
Where "LOCAL.DEF.OF.REMOTE.QUEUE" is my local definition of remote queue.
Can anybody guide me what are the correct values I need to give.

Thanks in advance
Praveen K.
Back to top
View user's profile Send private message
bob_buxton
PostPosted: Thu Nov 07, 2002 12:59 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

You can only put to a remote queue so MQOO_INPUT_xxx is not valid for a remote queue.

You should use another local queue to receive your reply messages.

PS It is not normally necessary/desirable to post to multiple forums.
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
Praveen
PostPosted: Thu Nov 07, 2002 6:26 am    Post subject: Reply with quote

Apprentice

Joined: 23 Oct 2002
Posts: 40
Location: Bangalore

Hi,
I am attaching a piece of my code, can you just tell me which all options I need to give and where should I mention another local queue to get the messages.
*************************************************************

qMgr = new MQQueueManager(qManager);
int openOptions = MQC.MQOO_OUTPUT | MQC.MQOO_SET | MQC.MQOO_INPUT_EXCLUSIVE;

MQQueue system_default_local_queue = qMgr.accessQueue("LOCAL.DEF.OF.REMOTE.QUEUE", openOptions);

MQMessage hello_world = new MQMessage();
hello_world.writeUTF("Hello World!");

MQPutMessageOptions pmo = new MQPutMessageOptions();

system_default_local_queue.put(hello_world,pmo);

MQMessage retrievedMessage = new MQMessage();
retrievedMessage.messageId = hello_world.messageId;

MQGetMessageOptions gmo = new MQGetMessageOptions();

system_default_local_queue.get(retrievedMessage, gmo);

String msgText = retrievedMessage.readUTF();
System.out.println("Retrieved Message is...." + msgText);
system_default_local_queue.close();

qMgr.disconnect();
*************************************************************
I am newbie to MQSeries, please help me out.
Sorry for posting the question in multiple forums.

Thanks in advance.

Praveen K.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Thu Nov 07, 2002 8:52 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Note to newbies, when posting code, please wrap your code with the BBCode tags of [code] and [/code] - it makes the code much more readable.

Change your openOptions to be:
int openOptions = MQC.MQOO_OUTPUT;

and you should be fine.

later
Roger...
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » MQ Series Error Code : 2045
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.