IBM Support

IT08540: IBM MQ v8: 'MQRC_NO_MSG_AVAILABLE' EXCEPTION ISSUED USING WMQ-JMS 8.0.0.2

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • After applying the IBM MQ v8.0.0.2 fix pack, an IBM MQ classes
    for JMS application logs a JMSWMQ1107 exception in the mqjms.log
    file when attempting to perform a synchronous message receive
    from an IBM MQ queue and no message is available:
    
    Exception ignored as no exception listener is registered:
      Message :
    com.ibm.msg.client.jms.DetailedIllegalStateException:
    JMSWMQ1107: A problem with this connection has occurred.
    An error has occurred with the WebSphere MQ JMS connection.
    Use the linked exception to determine the cause of this error.
    Class : class
    com.ibm.msg.client.jms.DetailedIllegalStateException
    Stack :
    com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(
    Reason.java:472)
    com.ibm.msg.client.wmq.common.internal.Reason.createException(Re
    ason.java:214)
    com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCall
    Success(WMQMessageConsumer.java:124)
    com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQCons
    umerShadow.java:1810)
    com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInt
    ernal(WMQSyncConsumerShadow.java:230)
    com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQCon
    sumerShadow.java:1446)
    com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMe
    ssageConsumer.java:533)
    com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveIn
    boundMessage(JmsMessageConsumerImpl.java:1015)
    com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receive(J
    msMessageConsumerImpl.java:652)
    com.ibm.mq.jms.MQMessageConsumer.receive(MQMessageConsumer.java:
    209)
    Caused by [1] --> Message : com.ibm.mq.MQException: JMSCMQ0001:
    WebSphere MQ call failed with compcode '2' ('MQCC_FAILED')
    reason '2033' ('MQRC_NO_MSG_AVAILABLE').
    Class : class com.ibm.mq.MQException
    Stack
    com.ibm.msg.client.wmq.common.internal.Reason.createException(Re
    ason.java:202)
    com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCall
    Success(WMQMessageConsumer.java:124)
    com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQCons
    umerShadow.java:1810)
    com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInt
    ernal(WMQSyncConsumerShadow.java:230)
    com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQCon
    sumerShadow.java:1446)
    com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMe
    ssageConsumer.java:533)
    com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveIn
    boundMessage(JmsMessageConsumerImpl.java:1015)
    com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receive(J
    msMessageConsumerImpl.java:652)
    com.ibm.mq.jms.MQMessageConsumer.receive(MQMessageConsumer.java:
    209)
    
    
    EXPLANATION:
    An attempt was made to deliver an exception to the connections
    exception listener but a listener has not been registered.
    
    ACTION:
    An exception listener must be registered with the connection to
    receive its exceptions.
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects all users of the IBM MQ classes for JMS
    v8.0.0.2 who perform synchronous receive calls, for example
    using the JMS methods:
    
        javax.jms.MessageConsumer.receive(long timeout)
        javax.jms.MessageConsumer.receiveNoWait()
    
    
    The problem only affects the v8.0.0.2 version of the IBM MQ
    classes for JMS.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    An IBM MQ classes for JMS application receives messages
    asynchronously, by implementing the JMS MessageListener
    interface.
    
    Should a problem be detected with the communication connection
    to the queue manager used by the asynchronous message consumer,
    the IBM classes for JMS will attempt to inform the application's
    "javax.jms.ExceptionListener" if one has been registered. If an
    ExceptionListener is not registered for the JMS Connection, then
    the IBM MQ classes for JMS will instead log any exceptions that
    would otherwise have been sent to the ExceptionListener into a
    file called "mqjms.log".
    
    When performing a synchronous message receive, if there were no
    messages on the queue such that the queue manager returned the
    IBM MQ reason code 2033 ('MQRC_NO_MSG_AVAILABLE') to the IBM MQ
    classes for JMS, then the IBM MQ classes for JMS incorrectly
    attempted to drive the ExceptionListener, if one had been
    defined on the JMS Connection. The logic associated with driving
    the ExceptionListener recognised that an MQRC 2033 return code
    was not appropriate for the ExceptionListener, and instead wrote
    a message to the IBM MQ classes for JMS log (mqjms.log)
    indicating that the MQRC 2033 exception had been thrown.
    
    If the ExceptionListener was not defined for the Connection, the
    IBM MQ classes for JMS instead directly wrote the exception to
    the log file (mqjms.log), again indicating that the MQRC 2033
    exception had been thrown.
    
    
    
    Both of these behaviours were incorrect for a synchronous
    message consumer. The JMS API dictates that 'null' should be
    returned on the API calls:
    
       javax.jms.MessageConsumer.receive(long timeout)
       javax.jms.MessageConsumer.receiveNoWait()
    
    if there is no message available on the queue/topic. No
    exception should be reported, either directly by an exception
    being returned to the consuming thread in the application, or to
    the JMS log file (mqjms.log).
    
    
    One consequence of this exception reporting could be that if the
    application was regularly not finding a message on the queue to
    consume, a significant quantity of data was being written to the
    mqjms.log file, which had the potential to fill the filesystem.
    

Problem conclusion

  • The IBM MQ classes for JMS have been updated such that the the
    MQRC 2033 exception is not reported in the mqjms.log file,
    matching reverting the behaviour to that of the IBM classes for
    JMS v8.0.0.1 and earlier.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v8.0       8.0.0.3
    
    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

    IT08540

  • Reported component name

    WMQ BASE MULTIP

  • Reported component ID

    5724H7251

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2015-04-24

  • Closed date

    2015-05-26

  • Last modified date

    2015-05-26

  • 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":"LOB45","label":"Automation"}}]

Document Information

Modified date:
26 May 2015