IBM Support

PI84543: DISTRIBUTED (XA) JDBC TRANSACTIONS FAILING WITH ITCAM DC

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Description:  ITCAM creates a separate thread to obtain JDBC
    metadata if the datasource name is not available through JNDI or
     other means.  This seems to create a new transaction manager in
     XA resource manager is involved leading to error messages like
    the following:
    
    - J2CA0027E: An exception occurred while invoking start on an XA
    Resource Adapter from DataSource jdbc/BPEDB
    - javax.transaction.xa.XAException: DSRA0230E: Attempt to
    perform operation [Ljava.lang.Object;@b63003eb is not allowed
    because transaction state is {1}.
    - SEVERE: Instantiating Spring Bean Factory Failed.Error
    creating bean with name 'entityManagerFactory' defined in class
    path resource [META-INF/jpa-context.xml]: Cannot resolve
    reference to bean 'operationsDB' while setting bean property
    'dataSource'; nested exception is
    org.springframework.beans.factory.BeanCreationException: Error
    creating bean with name 'operationsDB': Invocation of init
    method failed; nested exception is
    javax.naming.NameNotFoundException: Unable to resolve
    'jdbc.operationsDB'. Resolved 'jdbc'; remaining name
    'operationsDB'
    - J2CA0030E: Method enlist caught
    com.ibm.ws.Transaction.IllegalResourceIn2PCTransactionException:
    Illegal attempt to enlist multiple 1PC XAResources
    

Local fix

  • Disable the JDBC monitoring by setting the following property to
     "false" in toolkit_custom.properties
    com.ibm.tivoli.itcam.toolkit.ai.enablejdbc=false
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:
    *
    * Potentially all servers monitored by ITCAM whose applications
    * access datasources using JDBC connection.
    *
    ****************************************************************
    *
    * PROBLEM DESCRIPTION:
    *
    * ITCAM creates a separate thread to obtain JDBC metadata
    * if the datasource name is not available through JNDI or
    * other means.  This seems to create a new transaction manager
    * in XA resource manager is involved leading to error messages
    * like the following:
    *
    * - J2CA0027E: An exception occurred while invoking start on an
    *  XAResource Adapter from DataSource jdbc/BPEDB
    * - javax.transaction.xa.XAException: DSRA0230E: Attempt to
    * perform operation [Ljava.lang.Object;@b63003eb is not allowed
    * because transaction state is {1}.
    * - SEVERE: Instantiating Spring Bean Factory Failed.Error
    * creating bean with name 'entityManagerFactory' defined in
    * class path resource [META-INF/jpa-context.xml]: Cannot resolve
    * reference to bean 'operationsDB' while setting bean property
    * 'dataSource'; nested exception is
    * org.springframework.beans.factory.BeanCreationException: Error
    * creating bean with name 'operationsDB': Invocation of init
    * method failed; nested exception is
    * javax.naming.NameNotFoundException: Unable to resolve
    * 'jdbc.operationsDB'. Resolved 'jdbc'; remaining name
    * 'operationsDB'
    * - J2CA0030E: Method enlist caught
    *
    com.ibm.ws.Transaction.IllegalResourceIn2PCTransactionException:
    * Illegal attempt to enlist multiple 1PC XAResources
    *
    ****************************************************************
    *
    

Problem conclusion

  • The fix for this APAR is contained in the following maintenance
    releases:
    
      | interim fix | 7.2.0.0-TIV-ITCAM_DC-IF0015
      | interim fix | 7.1.1.0-TIV-ITCAM_J2EE-IF0005
      | interim fix | 7.1.0.0-TIV-ITCAMAD-IF0002
    
    ITCAM tries to obtain the Datasource name that is monitored
    through JNDI or other means.  However, in rare cases this may
    not be possible and will need to be obtained through the
    database connection metadata.  By default, ITCAM does not
    use the metadata as it can lead to database transaction
    failures.
    
    If it is absolutely needed, the following property can be added
    to the toolkit_custom.properties to obtain the datasource name
    from connection metadata:
    
    com.ibm.tivoli.itcam.toolkit.jdbc.dsname.method=SAME_THREAD or
    SEPARATE_THREAD
    
    SAME_THREAD: Calls connection.getMetaData() on the application
    thread.  This has been known to start a new transaction context
    in some Java EE containers.
    
    SEPARATE_THREAD : Spawns a new thread to call getMetaData().
    This avoid new transaction context on the application thread.
    However, in some cases, it registers a new resource manager with
    distributed transaction manager causing XA failures.
    
    If this property is required, it is recommended to be tested
    first in a non-production environment with the same JDBC driver
    on which it is intended to be used.  The behavior will vary
    depending on the JDBC driver.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI84543

  • Reported component name

    ITCAM WAS DIST

  • Reported component ID

    5724L6200

  • Reported release

    720

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-07-17

  • Closed date

    2018-04-24

  • Last modified date

    2018-04-24

  • 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

    ITCAM WAS DIST

  • Fixed component ID

    5724L6200

Applicable component levels

  • R710 PSY

       UP

  • R720 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS3PGL","label":"Tivoli Composite Application Manager for WebSphere"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"720","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
19 October 2021