IBM Support

IT19070: MQ CLASSES FOR JAVA APP USING CCDT FAILS TO CONNECT WHEN USING A BLANK QUEUE MANAGER NAM

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • An MQ classes for Java application attempts to connect to a
    queue manager using a Client Channel Definition Table (CCDT),
    and specifies a queue manager name using a space character, as
    follows:
    
      new
    java.net.URL("file:///var/mqm/qmgrs/myQMGR/@ipcc/AMQCLCHL.TAB");
      new com.ibm.mq.MQQueueManager(" ", ccdtUrl);
    
    The CCDT contains a CLNTCONN definition with an empty QMNAME
    property, which is expected to match the blank character as per
    the MQ documentation.  However this method call results in
    com.ibm.mq.MQException being thrown with reason code 2278
    'MQRC_CLIENT_CONN_ERROR', with the Java stack:
    
    com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason
    '2278'.
    at com.ibm.mq.MQManagedConnectionJ11.<init>
    at
    com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedCon
    nection
    at
    com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConn
    ection
    at com.ibm.mq.StoredManagedConnection.<init>
    at com.ibm.mq.MQSimpleConnectionManager.allocateConnection
    at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager
    at com.ibm.mq.MQQueueManagerFactory.procure
    at com.ibm.mq.MQQueueManagerFactory.constructQueueManager
    at com.ibm.mq.MQQueueManagerFactory.createQueueManager
    at com.ibm.mq.MQQueueManager.<init>
    at MyApplication.MyMethod
    
    Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2278
    at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect
    at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect
    at com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiConnect
    at com.ibm.mq.ese.jmqi.ESEJMQI.jmqiConnect
    at com.ibm.mq.MQSESSION.MQCONNX_j
    at com.ibm.mq.MQManagedConnectionJ11.<init>
    ... 12 more
    
    The connection to the queue manager is not established.  The
    connection can be established if an empty string is used for the
    queue manager name on the com.ibm.mq.MQQueueManager constructor.
    

Local fix

  • If you pass in the queue manager name into the MQQueueManager
    constructor and also specify the queue manager name on the
    client connection channel, it will connect successfully.
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    Users of the MQ classes for Java, who are using a Client Channel
    Definition Table (CCDT) to establish the connection information
    used to connect to the queue manager.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When using a non-empty queue manager name string to match an
    empty QMNAME entry within a CCDT file, the MQ classes for
    Java/JMS was failing to find a matching channel definition
    within the table.
    
    For example when using the MQ classes for Java with the
    constructor:
    
      com.ibm.mq.MQQueueManager(java.lang.String, java.net.URL)
    
    where the first argument (the String) is a character string
    consisting only of whitespace, the expectation was that any
    channel definitions within the CCDT which has an empty QMNAME
    field would be matched, as per the documentation statement:
    
    ------------------------------------------------
    The queueManagerName parameter on the MQQueueManager constructor
    can have one of the following values:
    &#09;-The name of a queue manager
    &#09;-An asterisk (*) followed by the name of a queue manager
    group
    &#09;-An asterisk (*)
    &#09;-Null, an empty string, or a string containing all blank
    characters
    ------------------------------------------------
    
    However a defect within the code was not correctly removing the
    whitespace from the supplied queue manager name in order to
    match the entries within the CCDT.
    

Problem conclusion

  • The code has been updated such that it now removes any trailing
    whitespace from the application provided queue manager name,
    before searching for matching entries within the CCDT.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v8.0       8.0.0.7
    v9.0 CD    9.0.3
    v9.0 LTS   9.0.0.2
    
    The latest available maintenance can be obtained from
    'WebSphere MQ Recommended Fixes'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037
    
    If the maintenance level is not yet available information on
    its planned availability can be found in 'WebSphere MQ
    Planned Maintenance Release Dates'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309
    ---------------------------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT19070

  • Reported component name

    WMQ BASE MULTIP

  • Reported component ID

    5724H7251

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-02-02

  • Closed date

    2017-02-28

  • Last modified date

    2017-02-28

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WMQ BASE MULTIP

  • Fixed component ID

    5724H7251

Applicable component levels

  • R800 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.0.0","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
28 February 2017