aspose file tools*
The moose likes JDBC and the fly likes db2 java.sql.SQLException: No suitable driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "db2 java.sql.SQLException: No suitable driver" Watch "db2 java.sql.SQLException: No suitable driver" New topic
Author

db2 java.sql.SQLException: No suitable driver

Remko de Vrijer
Greenhorn

Joined: Oct 16, 2007
Posts: 1
Hi list,

This post is a solution for solving the 'No suitable driver' problem with the db2 type2 driver.

My problem was the db2 client is 64 bit (solaris10 +local zone + xeon64) and the C libraries.

using 64 bit libs:

root@d-edm01:~# export LD_LIBRARY_PATH=/opt/IBM/db2/V9.1/lib64
root@d-edm01:~# java -d64 TestConn
ok
root@d-edm01:~# java -d32 TestConn
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at TestConn.main(TestConn.java:14)
No suitable driver

using 32bit libs:

root@d-edm01:~# export LD_LIBRARY_PATH=/opt/IBM/db2/V9.1/lib32
root@d-edm01:~# java -d32 TestConn
ok
root@d-edm01:~# java -d64 TestConn
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at TestConn.main(TestConn.java:14)
 
Don't get me started about those stupid light bulbs.
 
subject: db2 java.sql.SQLException: No suitable driver