What does the error "Invalid xid in xa..." mean?

What does the error "Invalid xid in xa..." mean?

book

Article ID: KB0087941

calendar_today

Updated On:

Products Versions
TIBCO Enterprise Message Service -
Not Applicable -

Description

Resolution:
-edited by pcali

Description
= = = = = =
xid represents a transaction ID.

The "invalid xid" errors occur because the xid’s assigned are invalid.

The Xid interface is a Java mapping of the X/Open transaction identifier XID structure. This interface specifies three accessor methods to retrieve a global transaction which are format ID, global transaction ID and branch qualifier. The Xid interface is used by both the transaction manager and the resource manager. In the specifications both branch qualifier and global transaction id sizes are specified as 64 bytes each.

public static final int MAXBQUALSIZE 64
public static final int MAXGTRIDSIZE 64

If the branch qualifier (bqual_length) and/or global transaction id (gtrid_length) violates the specification then you will see the "Invalid xid" error.

Cause:
======

Earlier versions of EMS such as EMS 4.x were not checking the size of the branch qualifier and global transaction id. This behavior was corrected in EMS 5.1.3 .

Prior to EMS 5.1.3 the EMS transactions log output would show
the global transaction id length, such as “85” below, which violates the specification yet no error would be thrown:

2009-11-03 11:54:40 [admin@sjcfsap5]: xastart connID=5878406
sessID=5878353 {formatID=0 gtrid_length=85 bqual_length=1
data=oracle.j2ee.ra.jms.generic787e162a772ea74b:3c0cede2:124bb97eebd:-7ffe%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00}


EMS 5.1.3 and later will report an error as the size of the branch qualifier and global transaction id are now checked.

ERROR:Invalid xid in xa start request. connID=xxxx sessID=xxxx
ERROR:Invalid xid in xa end request. connID=xxxx sessID=xxxx
ERROR:Invalid xid in xa commit request. connID=xxxx sessID=xxxx

For specification details, please check javax.transaction.xa.Xid or the X/Open DTC specification.


Environment
= = = = = = =
ALL

Resolution
= = = = = =
Upgrade to EMS 5.1.3 or greater.


Keywords/Tags
= = = = =  = = =
XID,Invalid xid,xa start,xa end,xa commit

Issue/Introduction

What does the error "Invalid xid in xa..." mean?