|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Help required MQSeries JAVA |
« View previous topic :: View next topic » |
Author |
Message
|
mira |
Posted: Thu Jul 03, 2003 3:02 pm Post subject: Help required MQSeries JAVA |
|
|
Newbie
Joined: 25 Feb 2002 Posts: 9
|
I am running a simple program to put messages into a queue. The program is written using Mqseries for Java classes.
I have created a Queue Manager (QM1 with a port#51234)(this is not the default QM).
I have created a local queue Q1 and a channel of type Server connection type using MqSeries Explorer ver 5.3
Now using the above, I am trying to run the program to put messages..
case1:
Errors are is as follows
*******************
case1 : when both queue managers are running
T************************************
MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
MQJE001: Completion Code 2, Reason 2009
An MQ Error Occurred: Completion Code is : 2
The Reason Code is : 2009
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:
172)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnecti
on(MQClientManagedConnectionFactoryJ11.java:270)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnectio
n(MQClientManagedConnectionFactoryJ11.java:290)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.jav
a:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConne
ctionManager.java:150)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.jav
a:682)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:620)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:393)
at QSender1.main(QSender1.java:3
**********************************************
case2: if I stop the default queue Manager and run the QM1
**********************************************
MQJE001: An MQException occurred: Completion Code 2, Reason 2059
MQJE011: Socket connection attempt refused
MQJE001: Completion Code 2, Reason 2059
An MQ Error Occurred: Completion Code is : 2
The Reason Code is : 2059
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2059
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:
172)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnecti
on(MQClientManagedConnectionFactoryJ11.java:270)
at com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnectio
n(MQClientManagedConnectionFactoryJ11.java:290)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.jav
a:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConne
ctionManager.java:150)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.jav
a:682)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:620)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:393)
at QSender1.main(QSender1.java:3
*********************
When I ran with defalt QM and default objects it is running fine.
I have checked the properties of default QM and channel..everything is matching..
Please help me in this regard..
Thanks in advance..
mira |
|
Back to top |
|
 |
ashgove |
Posted: Thu Jul 03, 2003 7:49 pm Post subject: |
|
|
Novice
Joined: 29 May 2003 Posts: 11
|
Mira
Seems to be a problem in code.
Usually one gets the same error when the channel is incorrectly
defined in MQEnvironment properties.
Have u configured any channel?
Define in the same in MQEnvironment properties.
In case not define it as SYSTEM.DEF.SVRCONN for the channel
property in MQEnvironment.
If it does not work still, paste ur code in the forum and also
the configuration of MQSeries..
HTH _________________ -A- |
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu Jul 03, 2003 9:15 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Sounds like your MQEnvironment class has the wrong values. What did you set for the following:
Code: |
MQEnvironment.hostname = ??
MQEnvironment.channel = ??
MQEnvironment.port = ?? |
It looks as through you used the wrong port value. Try using the port # that you mentioned earlier:
Code: |
MQEnvironment.hostname = "10.10.10.10"; // use correct hostname
MQEnvironment.channel = "SYSTEM.DEF.SVRCONN";
MQEnvironment.port = 51234; |
Also, make sure you have a channel listener running for the port # and associated queue manager. (Note: A channel listener CANNOT listen on multiple ports nor report to more than one queue manager.)
later
Roger... _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
mira |
Posted: Sun Jul 06, 2003 10:05 am Post subject: Thanks ..It's working |
|
|
Newbie
Joined: 25 Feb 2002 Posts: 9
|
Roger , HTH,
Thanks for your valuable replies..
Roger..as you mentioned i have not coded the port # .
With port #, the program is working fine..
Thanks a lot
mira |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jul 07, 2003 6:12 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You want the port number that the listener for the queue manager is configured to use.
Typically, this is port #1414. But it is completely customizable, so you will need to ask your MQSeries Administrator (or look at the configuration for the listener if you ARE your MQSeries Administrator). |
|
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
|
|
|
|