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 » Java Base connection problem to RACF MQ server

Post new topic  Reply to topic
 Java Base connection problem to RACF MQ server « View previous topic :: View next topic » 
Author Message
dan_k
PostPosted: Tue Oct 31, 2006 2:29 pm    Post subject: Java Base connection problem to RACF MQ server Reply with quote

Newbie

Joined: 31 Oct 2006
Posts: 2

I've been struggling with this for about a week now, hopefully someone can point me in the right direction.
I have searched through this forum 10x over and have not found an answer to my problem. I also do not have direct access to the MQ server as it is maintained by another entity a few hundred miles away.
I'm attempting to connect and send a test message to an MQ server version 5.3 with this base java program:
Code:

import com.ibm.mq.*;
import java.io.*;

public class MQtest2 {

   private String qManager = "MQMD"; // define name of queue

   private MQQueueManager qMgr; // define a queue manager

   public static void main(String args[]) {
      new MQtest2();
   }

   public MQtest2() {
      MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,
            MQC.TRANSPORT_MQSERIES_CLIENT);
      MQEnvironment.properties.put(MQC.USER_ID_PROPERTY, "userid");
      MQEnvironment.properties.put(MQC.PASSWORD_PROPERTY, "password");
      MQEnvironment.properties.put(MQC.HOST_NAME_PROPERTY, "ip_address");
   
      MQEnvironment.properties.put(MQC.CHANNEL_PROPERTY, "CHANNEL");

      try {
         qMgr = new MQQueueManager(qManager);
      
         int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT
               | MQC.MQOO_INQUIRE | MQC.MQOO_SET_IDENTITY_CONTEXT
               | MQC.MQOO_PASS_IDENTITY_CONTEXT;
   
         MQQueue system_default_local_queue = qMgr.accessQueue(
               "ERT003_APPL_SEND_QUEUE", openOptions);

         int curDepth1 = system_default_local_queue.getCurrentDepth();

         // specify the message options...
         MQPutMessageOptions pmo = new MQPutMessageOptions();
         MQMessage regrenewal = new MQMessage();
         regrenewal.writeUTF("test message");
         system_default_local_queue.put(regrenewal, pmo);
         qMgr.commit();
         system_default_local_queue.close();
         // Disconnect from the queue manager
         qMgr.disconnect();
      }
      catch (MQException ex) {
         System.out
               .println("A  WebSphere  MQ  error  occurred  :  Completion  code  "
                     + ex.completionCode
                     + "  Reason  code  "
                     + ex.reasonCode + "   \n" + ex);
      }
      catch (java.io.IOException ex) {
         System.out
               .println("An  error  occurred  whilst  writing  to  the  message  buffer:  "
                     + ex);
      }
   }

   static void dumpHexId(byte[] myId) {
      System.out.print("X'");
      for (int i = 0; i < myId.length; i++) {
         char b = (char) (myId[i] & 0xFF);
         if (b < 0x10) {
            System.out.print("0");
         }
         System.out.print((String) (Integer.toHexString(b)).toUpperCase());
      }
      System.out.println("'");
   }
}



Everytime I run this I get in return:
Code:

MQJE001: An MQException occurred: Completion Code 2, Reason 2058
MQJE036: Queue manager rejected connection attempt
MQJE001: An MQException occurred: Completion Code 2, Reason 2058
MQJE036: Queue manager rejected connection attempt
A  WebSphere  MQ  error  occurred  :  Completion  code  2  Reason  code  2058
com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2058
MQJE036: Queue manager rejected connection attempt

The only thing about their server is that they mentioned RACF security. Being a noob in the MQ world, I am unfamiliar with this. Would there be anything extra I would have to add to my code to successfully authenicate with RACF? I do not have any information on certificates or keys, only a username and password.
After attempting to ask the admins of the MQ server if they could help, they responded with:
ICH70004I USER(....) GROUP(CICSUSER) NAME(....) is trying to update an MQ entity 'WMQD.ALTERNATE.USER.-BLANK-' that they shouldn't.

If anyone has any ideas, I would be most grateful.

Thanks,
Dan
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 31, 2006 2:36 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You need to confirm with them that they have the Client Attachment Facility installed and operational.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dan_k
PostPosted: Tue Oct 31, 2006 2:57 pm    Post subject: Reply with quote

Newbie

Joined: 31 Oct 2006
Posts: 2

So the 2058 couldn't come from their security kicking me off? If not, just to anticipate, do I need to make any special configurations in my Java for RACF?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 31, 2006 3:36 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Not RACF, per se. You just have to make sure you are correctly passing the User Id.

For me to say one way or another whether you were doing that, I'd have to review the Using Java manual again - it's been a few weeks since I've read the relevant sections to know for sure.
_________________
I am *not* the model of the modern major general.
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 » Java Base connection problem to RACF MQ server
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.