IBM Support

Why does isClosed() throw an Exception when used with a ResultSet ?

Question & Answer


Question

Why does isClosed() throw an Exception when used with a ResultSet in an Informix JDBC Program ?

Cause

The Informix JDBC Driver is built under JDK 1.4.2 . This Version of the JDK does not have an isClosed() method available for ResultSet. Attempting to use isClosed() with a ResultSet can cause a runtime exception like the one detailed below
.
Exception in thread "main" java.lang.AbstractMethodError:com.informix.jdbc.IfxResultSet.isClosed()Z

Answer

JDK 1.6 does have an isClosed() method available for ResultSet, IBM has the Data Server Driver Package available which has been compiled under JDK 1.6 and does allow the use of isClosed() with ResultSet.

The IBM Data Server Driver Package contains a JDBC Driver that has been compiled under JDK 1.6. This Driver allows connections to the following

  • DB2 using DRDA protocol.
  • Informix IDS, using DRDA protocol ( the IDS Engine must have drda type connection specified in the sqlhosts file)
  • Cloudscape/Derby

[{"Product":{"code":"SSVT2J","label":"Informix Tools"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Informix JDBC","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"3.0;3.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
20 January 2022

UID

swg21418239