Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-15484

Upgrade to Narayana 5.11.3.Final-redhat-00001 - Fuse Spring Boot narayana-jta does not treat null value in com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • fuse-7.9-GA
    • fuse-7.8-GA
    • Narayana
    • None

      As commented on TEIID-6040,

      • Fuse Spring Boot using xa datasource shows NullPointerException on jta periodic recovery every 2 mins.
      • This NullPointerException disappear after executing any xa transaction on Fuse spring boot.

      This is because jta-5.9.8.Final-redhat-00002.jar com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass() method does not handle a null value:

      	private final void xaRecoveryFirstPass(XAResource xares)
      	{
      		if (jtaLogger.logger.isDebugEnabled()) {
                  jtaLogger.logger.debug("xarecovery of " + xares);
              }
      
      		
      			Xid[] trans = null;
      
      			try
      			{
      				trans = xares.recover(XAResource.TMSTARTRSCAN);
      
      				if (jtaLogger.logger.isDebugEnabled()) {
                          jtaLogger.logger.debug("Found "
                                  + ((trans != null) ? trans.length : 0)
                                  + " xids in doubt");
                      }
      				if (jtaLogger.logger.isTraceEnabled()) {
      					for (Xid xid : trans) {         // no null check for "trans"
      

      Please do the null check like the one for debug level log in the same method:

                          jtaLogger.logger.debug("Found "
                                  + ((trans != null) ? trans.length : 0)
                                  + " xids in doubt");
      

              ggrzybek Grzegorz Grzybek
              rhn-support-hfuruich Hisao Furuichi
              Federico Mariani Federico Mariani
              Stefan Veres (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: