Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / December 2004

Tip: Looking for answers? Try searching our database.

JDBC Connection and ClassNotFoundException

Thread view: 
Julie - 22 Dec 2004 08:24 GMT
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 ?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.