Results 1 to 9 of 9
  1. #1
    Join Date
    May 2011
    Posts
    15

    Unanswered: 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

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    db2jcc.jar must be in the Java classpath, along with the license jar.

  3. #3
    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 09:26.

  4. #4
    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.

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    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.

  6. #6
    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

  7. #7
    Join Date
    May 2011
    Posts
    15
    I work on win 7

  8. #8
    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

  9. #9
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •