|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Pb Connection MQClient Windows 2000 / MQServer OS390 (2009) |
« View previous topic :: View next topic » |
Author |
Message
|
NOURY |
Posted: Thu Jun 27, 2002 11:49 pm Post subject: Pb Connection MQClient Windows 2000 / MQServer OS390 (2009) |
|
|
Newbie
Joined: 27 Jun 2002 Posts: 1
|
I want to connect to a queue manager on OS390 with VisualAge For Java (Windows 2000)
See above the operations i have already made :
- Installation MQSeries Client on my computer (Windows 2000).
(need to define the variable environnement MQSERVER ???)
- Definition an server connection channel (JAVAQ1)
- Code java
When i attempt a connection, an error occured :
MQJE016 : Le gestionnaire de files d'attente MQ a fermé immédiatement le canal lors de la connexion.
Code anomalie de fermeture = 2009
MQJE001 : Code achèvement 2, raison 2009
An MQSeries error occurred : Completion code 2 Reason code 2009
See the code java :
try {
// Définition de l'environnement
MQEnvironment.channel = "JAVAQ1" ;
MQEnvironment.hostname = "172.19.40.2" ;
MQEnvironment.port = 1414;
MQEnvironment.userID = "";
MQEnvironment.password = "";
// Create a connection to the queue manager
String qManager = "QD01";
MQQueueManager qMgr = new MQQueueManager(qManager);
// Set up the options on the queue we wish to open...
// Note. All MQSeries Options are prefixed with MQC in Java.
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT;
// Now specify the queue that we wish to open,
// and the open options...
MQQueue system_default_local_queue =
qMgr.accessQueue("SYSTEM.DEFAULT.LOCAL.QUEUE", openOptions);
// Define a simple MQSeries message, and write some text in UTF format..
MQMessage hello_world = new MQMessage();
hello_world.writeUTF("Hello World!");
// specify the message options...
MQPutMessageOptions pmo = new MQPutMessageOptions();
// accept the // defaults,
// same as MQPMO_DEFAULT
// put the message on the queue
system_default_local_queue.put(hello_world, pmo);
// get the message back again...
// First define a MQSeries message buffer to receive the message into..
MQMessage retrievedMessage = new MQMessage();
retrievedMessage.messageId = hello_world.messageId;
// Set the get message options...
MQGetMessageOptions gmo = new MQGetMessageOptions(); // accept the defaults
// same as MQGMO_DEFAULT
// get the message off the queue...
system_default_local_queue.get(retrievedMessage, gmo);
// And prove we have the message by displaying the UTF message text
String msgText = retrievedMessage.readUTF();
System.out.println("The message is: " + msgText);
// Close the queue...
system_default_local_queue.close();
// Disconnect from the queue manager
qMgr.disconnect();
}
// If an error has occurred in the above, try to identify what went wrong
// Was it an MQSeries error?
catch (MQException ex) {
System.out.println(
"An MQSeries error occurred : Completion code "
+ ex.completionCode
+ " Reason code "
+ ex.reasonCode);
}
// Was it a Java buffer space error?
catch (java.io.IOException ex) {
System.out.println(
"An error occurred whilst writing to the message buffer: " + ex);
}
Have you an idea of the problem ???
Thanks for your response ... |
|
Back to top |
|
 |
RogerLacroix |
Posted: Fri Jun 28, 2002 8:07 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Reason code 2009 generally means something is wrong with your channel name.
Do you really have a SVRCONN channel definied called JAVAQ1 ?? (Not a queue. ) Most people would call their channels CLIENT_01, CLIENT_CHL01, etc... Note: MQ object names are case sensitive.
The other thing that is required on OS/390 is the Client Attachment Feature (CAF). Has it been installed (separate purchase) and is it running (check the CHIN started-task).
later
Roger... |
|
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
|
|
|
|