If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > driver jdbc on DB2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-27-11, 07:15
TDVH TDVH is offline
Registered User
 
Join Date: May 2011
Posts: 15
driver jdbc on DB2

if I want connection with DB2

hello,
this error appears

don't found this class

Class.forName("com.ibm.db2.jcc.DB2Driver");

how I can solve ??

I am install the driver + clinet

but I don't know where put this files

help me

thanks
Reply With Quote
  #2 (permalink)  
Old 05-27-11, 07:57
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
db2jcc.jar must be in the Java classpath, along with the license jar.
Reply With Quote
  #3 (permalink)  
Old 05-27-11, 08:07
TDVH TDVH is offline
Registered User
 
Join Date: May 2011
Posts: 15
thank you :(

sorry but this is the first time work on DB2,

I put in the variable name: CLASSPATH

and in the variable value: C:\program files\IBM\SQLIB\java\db2jcc.jar

and JAVA_HOME = C:\Program Files\Java\jdk1.5.0_10
PATH = %PATH%;%JAVA_HOME%\bin


I work on the netbeans 6.9

but it dosn't work

plz help me

Last edited by TDVH; 05-27-11 at 08:26.
Reply With Quote
  #4 (permalink)  
Old 05-27-11, 09:09
TDVH TDVH is offline
Registered User
 
Join Date: May 2011
Posts: 15
hello,

this is the error

java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver

I try to change the name of db2java.zip to db2java.jar but I can't change type of folder from zip to jar.

so any body have idea.
Reply With Quote
  #5 (permalink)  
Old 05-27-11, 09:14
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I don't think you understand what you're doing.

You need to use a library file appropriate for the driver that you want to use. For the JCC driver (com.ibm.db2.jcc.DB2Driver) it's db2jcc.jar plus the license jar. For the APP driver (COM.ibm.db2.jdbc.app.DB2Driver, which is deprecated) it's db2java.zip.
Reply With Quote
  #6 (permalink)  
Old 05-27-11, 10:19
TDVH TDVH is offline
Registered User
 
Join Date: May 2011
Posts: 15
umm

I search in google and I found this sloution



the problem appears

java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver


I put in the variable name: CLASSPATH

and in the variable value: C:\program files\IBM\SQLIB\java\db2jcc.jar

and JAVA_HOME = C:\Program Files\Java\jdk1.5.0_10
PATH = %PATH%;%JAVA_HOME%\bin

finally CLASSPATH1 to license jar.

but the problem still appears.

I work on DB2 9.7, netbeans 6.9,jdk1.5.0_10.

thanks a lot
Reply With Quote
  #7 (permalink)  
Old 05-27-11, 11:02
TDVH TDVH is offline
Registered User
 
Join Date: May 2011
Posts: 15
I work on win 7
Reply With Quote
  #8 (permalink)  
Old 05-27-11, 12:30
TDVH TDVH is offline
Registered User
 
Join Date: May 2011
Posts: 15
I open jcc folder and I can not found DB2Driver class

If any body have idea plz help me
Reply With Quote
  #9 (permalink)  
Old 05-27-11, 12:39
TDVH TDVH is offline
Registered User
 
Join Date: May 2011
Posts: 15
ok

I found this sloution

To resolve this issue, copy the db2jcc.jar, db2jcc_license_cisuz.jar, db2jcc_license_cu.jar from %DB2TEMPDIR%\java\ to the \lib directory for your Web application server installation.

For example, these 3 jar files would be copied to the following directory.
C:\Program Files\WebSphere\AppServer\installedApps\<machine name>\IBMRPM.ear\IBMRPM.war\WEB-INF\lib


but I can't understand

it is mean copy 3 files from IBM/java to what ???

plz explain me
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On