OracleXAException - XID is not valid

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

OracleXAException - XID is not valid

greenbean
We are getting an OracleXAException when writing to Oracle 10g from a web service.  It only seems to occur when we execute the web service multiple times in a row (the client iterates a list of values, executing the web service for each).
 
We added in some additional logging following the example here:  http://jira.codehaus.org/browse/BTM-98
 
We get Oracle error 24756 (the xid is not valid).  Does anyone know why this would occurr?   Attached are logs entries from BitronixTransaction during the problem.  In other cases, the same code is executed, and does not have problem with the commit.
 
2011-10-06 15:10:51,950 (737072696E672D62746D0000000471270B2F00000691) INFO  [bitronix.tm.twopc.Committer] (http-0.0.0.0-8080-27) The XA Error is :-4
2011-10-06 15:10:51,958 (737072696E672D62746D0000000471270B2F00000691) INFO  [bitronix.tm.twopc.Committer] (http-0.0.0.0-8080-27) The XA Error message is :The XID is not valid.
2011-10-06 15:10:51,969 (737072696E672D62746D0000000471270B2F00000691) INFO  [bitronix.tm.twopc.Committer] (http-0.0.0.0-8080-27) The Oracle Error code is :24756
2011-10-06 15:10:51,974 (737072696E672D62746D0000000471270B2F00000691) INFO  [bitronix.tm.twopc.Committer] (http-0.0.0.0-8080-27) The Oracle SQL Error code is :0
2011-10-06 15:10:51,977 (737072696E672D62746D0000000471270B2F00000691) INFO  [bitronix.tm.twopc.Committer] (http-0.0.0.0-8080-27) OracleXAException cause:
2011-10-06 15:10:52,002 (737072696E672D62746D0000000471270B2F00000691) ERROR [bitronix.tm.twopc.AbstractPhaseEngine] (http-0.0.0.0-8080-27) resource oracle failed on a Bitronix XID [737072696E672D62746D0000000471270B2F00000691 : 737072696E672D62746D0000000471270B7600000693]: bitronix.tm.internal.BitronixXAException: unknown heuristic termination, global state of this transaction is unknown - guilty: an XAResourceHolderState with uniqueName=oracle XAResource=oracle.jdbc.driver.T4CXAResource@3c332d5b (ended) with XID a Bitronix XID 737072696E672D62746D0000000471270B2F00000691 : 737072696E672D62746D0000000471270B7600000693]
 
Caused by: oracle.jdbc.xa.OracleXAException
        at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1040)
        at oracle.jdbc.xa.client.OracleXAResource.commit(OracleXAResource.java:573)
        at bitronix.tm.twopc.Committer$CommitJob.commitResource(Committer.java:194)
        ... 60 more
 
 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

logs.txt (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OracleXAException - XID is not valid

Ludovic Orban
Administrator
Sorry for the delay answering this question, it looks like I missed the email notification.

The ORA-24756 error can have a few causes, the most common ones being:

 - a bug in the DB or JDBC driver
 - some internal DB code (usually a SP or a trigger) unilaterally committing the transaction branch
 - an Oracle RAC node failover

It's the kind of problem that is almost impossible to find the root cause of without tracing it on-site. I would first start my investigation by checking if there are some in-doubt transactions pending on the Oracle server then try to correlate that with BTM's journal contents to make sure the failing transaction remained atomic.

After that, it's up to you to try to figure out what is causing this problem without too much clue. Oracle's support might be needed to solve this problem.

Good luck!