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 » Help required MQSeries JAVA

Post new topic  Reply to topic
 Help required MQSeries JAVA « View previous topic :: View next topic » 
Author Message
mira
PostPosted: Thu Jul 03, 2003 3:02 pm    Post subject: Help required MQSeries JAVA Reply with quote

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
View user's profile Send private message
ashgove
PostPosted: Thu Jul 03, 2003 7:49 pm    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger MSN Messenger
RogerLacroix
PostPosted: Thu Jul 03, 2003 9:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
mira
PostPosted: Sun Jul 06, 2003 10:05 am    Post subject: Thanks ..It's working Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Mon Jul 07, 2003 6:12 am    Post subject: Reply with quote

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

MQSeries.net Forum Index » IBM MQ Java / JMS » Help required MQSeries JAVA
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.