|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
2045 error on accessing the remote queue |
« View previous topic :: View next topic » |
Author |
Message
|
navjotkaur78 |
Posted: Tue Feb 28, 2006 11:28 pm Post subject: 2045 error on accessing the remote queue |
|
|
Apprentice
Joined: 09 Feb 2006 Posts: 31
|
I'm trying to send mesaage to a remote QM in MQV6. i've 2 QM's , QM1 and QM2. QM1 have remote queue Q2. when i run the java code
public class Intercommunication {
private String qManager1 ="QM1";
private MQQueueManager qMgr;
public Intercommunication() {
try {
qMgr = new MQQueueManager(qManager1);
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF |MQC.MQOO_OUTPUT ;
MQQueue queue1 = qMgr.accessQueue("Q2",openOptions);
MQMessage hello = new MQMessage();
hello.writeUTF("this is test message");
MQPutMessageOptions pmo = new MQPutMessageOptions();
queue1.put(hello,pmo);
System.out.println("Message put in the Remote Queue");
queue1.close();
qMgr.disconnect();
} catch (MQException e) {
e.printStackTrace();
} catch (IOException e1) {
e1.printStackTrace();
}
}
}
i get the following error on the line
MQQueue queue1 = qMgr.accessQueue("Q2",openOptions);
MQJE001: Completion Code 2, Reason 2045
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2045
at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:2854)
at com.ibm.mq.MQQueueManager.accessQueue(MQQueueManager.java:2911)
at sample.Intercommunication.<init>(Intercommunication.java:32)
at sample.Intercommunication.main(Intercommunication.java:70) |
|
Back to top |
|
 |
vennela |
Posted: Tue Feb 28, 2006 11:33 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Your options are not valid
Change open options to
Code: |
int openOptions = MQC.MQOO_OUTPUT ; |
Also
Code: |
C:\Documents and Settings\admin>mqrc 2045
2045 0x000007fd MQRC_OPTION_NOT_VALID_FOR_TYPE
C:\Documents and Settings\admin> |
When you get an MQ error use mqrc to find what it is |
|
Back to top |
|
 |
navjotkaur78 |
Posted: Tue Feb 28, 2006 11:37 pm Post subject: |
|
|
Apprentice
Joined: 09 Feb 2006 Posts: 31
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|