Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    41

    Question Unanswered: java.sql.SQLException: No suitable driver

    Hi

    I am using Linux with IBM DB2 combination with Apache and tomcat. The application was working fine. But when we move the server from one place to another place (the ip address, url are changed) it is not working now and i am getting

    java.sql.SQLException: No suitable driver

    I am using two files for connection. one is database.xml which is used during login and the other is connection.ini file. I am able to login and i can confirm this because i am capturing last login date in one of my table. Once it moves to the second page i am getting the above mentioned error.

    i am loging in as db2inst1 to connect thro application.
    i have checked the CLASSPATH for db2inst1 it is correctly reflecting

    /home/db2inst1/sqllib/function:/home/db2inst1/sqllib/java/db2java.zip:/home/db2inst1/sqllib/java/runtime.zip:.

    i have connected to the remote database server from linux using
    db2 connect to PROD user user_name using password

    I have given the database.xml and connection.ini file for reference

    pls help
    jai

    content of database.xml

    <database name="ekgdb" engine="db2">
    <driver class-name="COM.ibm.db2.jdbc.app.DB2Driver" url="jdbc:db2rod">
    <param name="user" value="db2inst1"/>
    <param name="password" value="abc"/>
    </driver>
    <mapping href="certificate.xml"/>
    <mapping href="company.xml"/>
    <mapping href="course.xml"/>
    <mapping href="evaluation.xml"/>
    <mapping href="login.xml"/>
    <mapping href="resource.xml"/>
    <mapping href="run.xml"/>
    <mapping href="trainee.xml"/>
    <mapping href="log.xml"/>
    </database>

    content of connection.ini

    driver=COM.ibm.db2.jdbc.app.DB2Driver
    uid=db2inst1
    pwd=abc
    url=jdbc:db2rod

  2. #2
    Join Date
    Jan 2003
    Posts
    1
    driver=COM.ibm.db2.jdbc.app.DB2Driver
    this driver only works on the local machine. you need COM.ibm.db2.jdbc.net.DB2Driver

    regards

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    You can use the appDriver for 'Remote' databases also ...

    Cheers

    Sathyaram

    Originally posted by krabat
    this driver only works on the local machine. you need COM.ibm.db2.jdbc.net.DB2Driver

    regards

Posting Permissions

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