You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by ia...@bankone.com on 2003/05/09 19:41:25 UTC

JDBC, DB2 and AXIS

Dear List,

I'm running into difficulty connecting to a DB2 database via JDBC in AXIS.
I'm hoping someone else has already run across this and developed a
fix/work-around.

If it maters, operating system is RedHat Advanced Server 2.1, database is
IBM DB2 Universal Database Enterprise Edition version 7.2.5 for Linux, AXIS
is version 1.0 and Servlet container is Tomcat 4.1.

>From the command line, I am able to connect, both by the Command Line
Processor and JDBC.  The only requirement being that I need to source the
db2profile first.

I have the following code within the init() method of my Handler, but it
consistently dies with IllegalArgumentException: unknown driver:
COM.ibm.db2.jdbc.app.DB2Driver:

String driver = (String)getOption("driver");

try {
    // register the driver with java.sql.DriverManager
    System.out.println("registering JDBC driver " + driver);
    Class.forName(driver);
}
catch (ClassNotFoundException cnfe) {
    throw new IllegalArgumentException("unknown driver: " + driver);
}

I have tried sourcing db2profile in /etc/tomcat4/tomcat4.conf (and have
confirmed that the file is being sourced) but that doesn't seem to make any
difference.

Any insight would be greatly appreciated.


Thanx,
Ian

Ian D. Stewart
Open Systems Engineer II
Enterprise Midrange - Bank One Infrastructure & Operations
ian_d_stewart@bankone.com
(614) 213-6100



This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.