DB2 JDBC Driver
Since most folks come to this site from Googling errors, here's a new one for you - complete with a solution! When I tried to connect from OS X to a DB2 database today, I received the following error:
java.sql.SQLException: java.lang.UnsatisfiedLinkError: no db2jdbc in java.library.path at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source)
The reason this happens is because there are two JDBC Drivers for DB2 - the first is a native type-2 driver (signified by app in the classname) and the 2nd is a type-4 driver (signified by net in the classname). This page describes the difference between the DB2 JDBC Drivers.
To solve this issue, I changed my JDBC classname to be COM.ibm.db2.jdbc.net.DB2Driver and the error went away. Of course, the type-2 driver is faster, but since there is no client for DB2 that I can install on OS X, I'll still with .net. on the Mac, and .app. with the DB2 client on Windows. Of course, I prefer no client install - it just seems cleaner and easier to me.
The Next Day: I also discovered that it's very important that your db2java.jar file is really the db2java.zip file from the server. If the versions don't match (i.e. trying to connect to a 7.2 db with an 8.1 driver), it actually kills the JDBC Listener! What a pile of...
The use of Google as verb is pretty much common place in the American English language these days. J-Lo even uses it in Maid in Manhattan, which by the way is an execellent movie to watch with the misses to obtain additional brownie points.
However, shouldn't it be written without capitals then? I.e. 'to google', 'googling'. Never saw capitalised verbs before.
Another one: I accidently arrived at this stie using https://. Are you aware that it show the Apache test page in that case? Probably not important.
Cheers,
Jaap, Amsterdam Netherlands
Posted by Jaap on January 13, 2004 at 02:02 PM MST #