JDBC is one of those core, essential components where you want to see continued incremental improvement with no interface impacts: just keep dropping in the latest versions and expect it to work. Yay, back compatibility!
JDBC 4.0 is relatively new to DB2 LUW (first available in version 9.5), but it and prerequisite Java 6 have certainly been around long enough for folks to start switching over to it. Just don’t assume that everything in a deep open source stack will work with it.
In yesterday’s action, perfectly-good BIRT 2.5.1 reports failed (“data set column … does not exist” exception) in an environment with DB2’s JDBC 4.x drivers. At first, I suspected the particular db2jcc4.jar level, since it was taken from DB2 9.7 Fixpack 3: that now-deprecated fixpack that does everything evil except steal your kidneys. But since new versions of BIRT (like the 3.7.1 version I use) worked fine with that version of Ernie (ahem, JDBC 4.0) and old versions of BIRT worked fine with JDBC 3.0 (db2jcc.jar), that flagged the culprit. Turns out, the report SQLs use column aliases (who doesn’t?) and apparently JDBC 4.0’s getColumnName “fixes” broke these. Upgrading BIRT brought harmony back to the universe.
With “broken compatibility” issues like this, it’s tempting to procrastinate on open source upgrades. That’s why Maven POMs quickly develop inertia: once you get it all working together, who has time to test new dependency version permutations? Fortunately, the Eclipse project and others do a good job of bundling compatible toolsets for download. That way, if something “doesn’t work on my machine”, it’s quick work to see how it plays with the latest and greatest stack.