ResultSet.HOLD_CURSORS_OVER_COMMIT
is only supported with Oracle 10g 10.2.0 and higher with the Oracle JDBC driver 10.2.0 or higher. See http://docs.oracle.com/cd/E11882_01/java.112/e16548/overvw.htm#JJDBC28045 :
Feature | Server-Side Internal | JDBC OCI | JDBC Thin
...
JDBC 3.0 Holdable Cursors | 10.2.0 | 10.2.0 | 10.2.0
As you indicate you are using Oracle 9i, the feature doesn't work and an exception is thrown. And as the exception is SQLException
and not SQLFeatureNotSupportedException
, I assume you are using an old driver as well.