I have installed Websphere Studio Application Developer v5.1.2 and DB2
version 8.1.3 on my machine. I have a written a java class that tries
to connect to a local DB2 database, I have used :
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"), and I get a
ClassNotFoundException. From browsing various groups this seems to be
a common problem.
I have checked my classpath (using Window -> Preferences -> Java ->
Classpath variables), and the DB2_DRIVER_PATH is set to g:\program
files\ibm\sqllib\java\db2java.zip. I have checked and the zip file is
in this directory.
As a test, I have also created a connection in the Data Perspective
and am able to successfully connect to my local database and this uses
the same JDBC driver class as I'm trying to use in my class ! This
seems to indicate I've installed everything I need.
Does anyone know what I'm doing wrong ? How can I get my java class to
access the jdbc driver class ?
Stuart Leonard - 23 Dec 2004 04:24 GMT
Dunno what your problem might be. Have you tried using "JTOpen"? This
toolbox contains a type 3 driver that I have successfully used in connecting
to the iSeries.
http://www-124.ibm.com/developerworks/oss/jt400/
>I have installed Websphere Studio Application Developer v5.1.2 and DB2
> version 8.1.3 on my machine. I have a written a java class that tries
[quoted text clipped - 12 lines]
> Does anyone know what I'm doing wrong ? How can I get my java class to
> access the jdbc driver class ?
Dieter Bender - 23 Dec 2004 09:28 GMT
Hi,
this driver won't work, DB2 8.1.3 is not as400!
Dieter
> Dunno what your problem might be. Have you tried using "JTOpen"? This
> toolbox contains a type 3 driver that I have successfully used in
[quoted text clipped - 17 lines]
>> Does anyone know what I'm doing wrong ? How can I get my java class to
>> access the jdbc driver class ?