Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    1

    Unhappy Unanswered: Urgent :DB2 app driver for Linux

    Hi,
    I've installed DB2 7.1 Enterprise Edition on Red Hat Linux 7.3.
    I'm using tomcat as servlet engine with JDK 1.3.
    CLASSPATH is set to :
    /usr/IBMdb2/V7.1/java/db2java.zip:/usr/IBMdb2/V7.1/java/runtime.zip:/jdk1.3.1_02/lib/tools.jar:/jakarta-tomcat/webapps/cape/WEB-INF/classes

    Whenever I try to run a simple java program to test database connectivity it gives exception.

    The java Program is:

    import java.sql.*;

    class A
    {

    public static void main(String[] args)
    {
    Connection conn=null;
    try{
    Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
    conn = DriverManager.getConnection("jdbc:db2:sample","db2 inst1","abmcape");
    }catch(Exception e)
    {System.out.println("Exception : "+e);
    }

    }
    }


    The exception is :
    java.sql.SQLException: No suitable driver

    Please help me out.

    Thanks in advance
    Ambarish

  2. #2
    Join Date
    Jan 2003
    Posts
    2
    Since you are using the app driver, I suspect that the JDBC driver is unable to load the native code libraries. I think you need to update the LD_LIBRARY_PATH environment variable so that it includes the <home directory of DB2 instance owner>/sqllib/lib

Posting Permissions

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