Friday, August 20, 2010

DB2 -- more trouble

Turns out that the version of the jdbc driver we are using has a different behavior than all other jdbc drivers. The javadoc indicates that you should be able to make repeated calls to and simply get a null when the end of the RS has been reached. But the db2 driver blows up after the first call to an exhausted (consumed) RS:

Caused by: [ibm][db2][jcc][10120][10898] Invalid
 operation: result set is closed.
        at [diffkit-app.jar:na]
        at [diffkit-app.jar:na]
        at [diffkit-app.jar:na]
        at org.diffkit.diff.sns.DKDBSource.getNextRow( [diff

According to this, there is a new db2 jdbc driver that cures this behavior, and as a bonus doesn't require a license file!

db2 9.5

This is part of the 9.5 release, so I'm not sure it will be compatible with lower versions, but seems worth a try.