IBM Support

IT16032: QueueConnectionFactory throws JMSRuntimeException when creating jmscontext on z/OS when running in Liberty

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

  • After deploying the IBM MQ V8.0.0.4 JCA Resource Adapter into
    the WebSphere Application Server Liberty Profile for z/OS, the
    call to the method:
    
      createContext()
    
    on a JMS Queue Connection Factory object, looked up from JNDI,
    resulted in the following Java Exception being thrown,
    preventing the JMS Context object from being created for the
    application:
    
    00006944 id=         com.ibm.ws.webcontainer.webapp.WebApp
                           E handleRequest SRVE0315E: An exception
    occurred: java.lang.Throwable:
    com.ibm.msg.client.jms.DetailedJMSRuntimeException: MQJCA1011:
    Failed to allocate a JMS connection.
    An internal error caused an attempt to allocate a connection to
    fail.
    ...
    Caused by: com.ibm.msg.client.jms.DetailedJMSRuntimeException:
    MQJCA1011: Failed to allocate a JMS connection.
    An internal error caused an attempt to allocate a connection to
    fail.
    See the linked exception for details of the failure.
    	at
    com.ibm.msg.client.jms.DetailedJMSException.getUnchecked(Detaile
    dJMSException.java:266)
    	at
    com.ibm.mq.connector.services.JCAExceptionBuilder.buildException
    (JCAExceptionBuilder.java:201)
    	at
    com.ibm.mq.connector.services.JCAExceptionBuilder.buildException
    (JCAExceptionBuilder.java:135)
    	at
    com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createContex
    t(ConnectionFactoryImpl.java:622)
    	at
    com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createContex
    t(ConnectionFactoryImpl.java:550)
    ...
    Caused by: java.lang.ClassCastException:
    com.ibm.msg.client.jms.internal.JmsContextImpl incompatible with
    javax.jms.XAJMSContext
    	at
    com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl.
    createContext(ManagedQueueConnectionFactoryImpl.java:246)
    	at
    com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl.
    createContext(ManagedQueueConnectionFactoryImpl.java:47)
    	at
    com.ibm.mq.connector.outbound.ManagedConnectionImpl.<init>(Manag
    edConnectionImpl.java:170)
    	at
    com.ibm.mq.connector.outbound.ManagedQueueConnectionImpl.<init>(
    ManagedQueueConnectionImpl.java:74)
    	at
    com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl.
    createManagedConnection(ManagedQueueConnectionFactoryImpl.java:1
    52)
    	at
    com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(Fr
    eePool.java:1770)
    	at
    com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java
    :1489)
    	at
    com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2994)
    	at
    com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2335)
    	at
    com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionMa
    nager.java:1121)
    	at
    com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionM
    anager.java:688)
    	at
    com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createManage
    dJMSContext(ConnectionFactoryImpl.java:723)
    

Local fix

  • Call the createContext() method on a JMS Connection Factory
    object, rather than using a messaging domain specific Queue or
    Topic Connection Factory.
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    This issue affects users of the:
    
      - IBM MQ V8 JCA Resource Adapter
      - IBM MQ V9 JCA Resource Adapter
    
    who have JMS applications running in JEE environments on z/OS
    (for example in the WebSphere Liberty Profile or WebSphere
    Application Server V9) that connect to a queue manager using the
    BINDINGS transport mode and call one of the following methods:
    
      createContext()
      createContext(String, String)
      createContext(String, String, int)
      createContext(int)
    
    on either a JMS Queue Connection Factory or a JMS Topic
    Connection Factory that has been retrieved from a JNDI
    repository.
    
    
    Platforms affected:
    z/OS
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When a JMS application attempts to create a JMS Context object
    from a JMS Queue Connection Factory or a JMS Topic Connection
    Factory retrieved from a JNDI repository, the JEE Application
    Server connection pool manager uses a
    javax.resource.spi.ManagedConnectionFactory object to create a
    javax.resource.spi.ManagedConnection object that wraps the JMS
    Context object such that, once the application has finished
    using it, the object can be returned to a pool for reuse by
    another application.
    
    The IBM MQ JCA Resource Adapter assumed that the JMS Context
    object associated with the ManagedConnection object would always
    be an instance of javax.jms.XAJMSContext.  As such, an attempt
    was made to cast the JMS Context object created by the
    ManagedConnectionFactory to the subclass XAJMSContext.
    
    However, when the application is running within an JEE
    environment on z/OS and the JMS Queue Connection Factory or JMS
    Topic Connection Factory is configured to use the BINDINGS
    transport mode, the object created by the
    ManagedConnectionFactory is not an instance of
    javax.jms.XAJMSContext, but of the parent class
    javax.jms.JMSContext.   This is because, in this configuration,
    the z/OS Resource Recovery Services (RRS) is used to support
    global transactions, not XA.  Therefore, a
    java.lang.ClassCastException was thrown.
    

Problem conclusion

  • The IBM MQ JCA Resource Adapter has been updated so that the
    incorrect object cast described above is no longer performed.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v8.0       8.0.0.6
    v9.0 CD    9.0.2
    v9.0 LTS   9.0.0.1
    
    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

    IT16032

  • 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

    2016-07-08

  • Closed date

    2016-10-28

  • Last modified date

    2017-06-01

  • 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:
01 June 2017