Hi. I'm running a small Java app on an AIX server connecting to a DB2 database. Here's the code:
String dbURL = "jdbc:db2:icmdb01";
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
System.out.println("Connecting to Database URL = " + dbURL);
db = DriverManager.getConnection(dbURL);
The error I'm getting is:
java.sql.SQLException: No suitable driver
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.sql.SQLException.<init>(Compiled Code)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(Compiled Code)
at TestConnect.main(Compiled Code)
I've included the DB2 driver in the classpath. If I remove the DB2 driver from the classpath, I get a "ClassNotFound" error. So this tells me that it's something else. Any ideas?