Skip to main content

XA Connection Error: SQL OPEN for a held cursor was issued on a XA connection ERRORCODE=-4496, SQLSTATE=null


Technote (troubleshooting)


Problem(Abstract)

I received the following error message when setting up an XA connection using JDBC and Websphere:

SQL OPEN for a held cursor was issued on a XA connection ERRORCODE=-4496, SQLSTATE=null

Resolving the problem

The JDBC driver doesn't allow a held cursor to be opened on the database server for an XA connection.


Solution:


1.) It is suggested that you set the following to true: downgradeHoldCursorsUnderXa. The documentation link below illustrates that the DB2XADataSource extends DB2BaseDataSource and thus this property should be available for use.

Common IBM Data Server Driver for JDBC and SQLJ properties for all supported database products

"The com.ibm.db2.jcc.DB2XADataSource class extends the com.ibm.db2.jcc.DB2BaseDataSource class, and implements the javax.sql.XADataSource, java.io.Serializable, and javax.naming.Referenceable interfaces. "

DB2XADataSource class

2.) Check the location of the db2jcc.jar is correct and that Websphere can see it.

3.) Check if the correct driver is being used by Websphere. The default location of the JCC driver is .../sqllib/java/db2jcc.jar. Websphere may use its own copy which can be found somewhere else on the system.

If you still see the error after trying the above suggestion then contact DB2 support team to report the problem.


Related information

JDBC Error Codes

Rate this page:

(0 users)Average rating

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Rate this page:


(0 users)Average rating

Add comments

Document information

DB2 for Linux, UNIX and Windows


Software version:
8, 9.1, 9.5, 9.7


Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows


Reference #:
1386486


Modified date:
2013-02-06

Translate my page

Content navigation