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 » Cannot open QMgr connection on AIX ... code included

Post new topic  Reply to topic
 Cannot open QMgr connection on AIX ... code included « View previous topic :: View next topic » 
Author Message
pal
PostPosted: Fri Oct 25, 2002 7:16 am    Post subject: Cannot open QMgr connection on AIX ... code included Reply with quote

Apprentice

Joined: 14 Aug 2001
Posts: 35

Here is the command line I am using:

Code:
java -classpath .:/usr/mqm/java/lib:/usr/mqm/java/lib/com.ibm.mq.jar:/usr/mqm/java/lib/connector.jar:/usr/mqm/java/lib/jta.jar:/usr/mqm/java/lib/fscontext.jar:/usr/mqm/java/lib/providerutil.jar -Djava.library.path=/usr/mqm/lib:/usr/mqm/java/lib mq_connector testqm


Here is the class code:

Code:
import com.ibm.mq.MQEnvironment;
import com.ibm.mq.MQQueueManager;
import com.ibm.mq.MQQueue;
import com.ibm.mq.MQC;
import com.ibm.mq.MQException;

public class mq_connector
{

  public static void main ( String[] args )
  {
    String qmName = args[ 0 ];

    try
    {
      MQEnvironment.properties.put( MQC.HOST_NAME_PROPERTY, "" );
      MQEnvironment.properties.put( MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES );

      System.out.println( "connecting to qm " + qmName );

      MQQueueManager tempQm = new MQQueueManager( qmName );

      tempQm.disconnect();
    }
    catch( MQException mq_e )
    {
      System.out.println( "MQErrorCodes( " + mq_e.completionCode + ", " + mq_e.reasonCode + " )" );
      mq_e.printStackTrace();
      mq_e.getLinkedException().printStackTrace();
    }
    catch( Throwable t )
    {
      t.printStackTrace();
    }
  }
}


And here is the errir I am getting:

Code:
MQJE001: Completion Code 2, Reason 2059
MQErrorCodes( 2, 2059 )
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2059
        at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:171)
        at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:139)
        at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:157)
        at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:80)
        at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:150)
        at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java:666)
        at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:615)
        at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:392)
        at mq_connector.main(mq_connector.java:19)
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Oct 25, 2002 7:23 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

My initial guess is that you are suffering from segment 8 problems. Did you get an FDC file in /var/mqm/errors with a Probe Id of XY341019? If so, I'd suggest doing a search on the site for IPCCBaseAddress. You'll find information on how to get around the error.

If you are suffering from segment 8, an even better solution would be to upgrade to WebSphere MQ 5.3 which uses AIX extended shared memory to get around the problem.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
pal
PostPosted: Fri Oct 25, 2002 8:32 am    Post subject: Reply with quote

Apprentice

Joined: 14 Aug 2001
Posts: 35

Awesome ... you reminded me of a fix I had done a while back:

export LDR_CNTRL=MAXDATA=0x40000000

This made the above program work!

Thanks.
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Oct 25, 2002 12:18 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

The fix you mentioned is one of the ways to get around segment 8 problems.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
TonyD
PostPosted: Tue Oct 29, 2002 3:11 pm    Post subject: Reply with quote

Knight

Joined: 15 May 2001
Posts: 540
Location: New Zealand

Also:
http://www-3.ibm.com/software/ts/mqseries/support/summary/javasupp.html

'IPCCBaseAddr=11' fixed the problem in our case.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Cannot open QMgr connection on AIX ... code included
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.