Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java.sql.SQLException: No suitable driver

Status
Not open for further replies.

luiba

Programmer
Jun 2, 2003
2
BR
Hi all! I need help from the experts. I've been trying to run the "DB2Appl" sample code using the "sample" database provided with the DB2 distribution with no success.

FACTS:
Both client and server are running on the same Linux box.
DB2 is version 7.1 with FP3 and then FP9 applied (exception occurs no matter which FP I applied).
Classpath includes db2java.zip (tried both, from java and java12 subdirs).
Exception occurs on the "con = DriverManager.getConnection(url)" statement.
Used both Class.forName("COM.ibm.db2.jdbc.net.DB2Driver") with url "jdbc:db2://localhost/sample" and Class.forName("COM.ibm.db2.jdbc.app.DB2Driver") with url "jdbc:db2:sample""
When I use net (type 3 I guess) the the exception changes to "SQL1031N The database directory cannot be found on the indicated file system. SQLSTATE=58031" in the same statement.

Where/what could be my mistake?

Tks in advance

Luiz

 
By the way, just tested the sample with Hit Software jdbc driver, which worked fine. I´ve read about problems in IBM drivers, but in the earliest versions. Are there known problems in FP 9 or am I doing something wrong?

Rgds,

Luiz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top