This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: db2 java.sql.SQLException: No suitable driver
 
Similar Threads
Exception in thread "main" java.sql.SQLException: No suitable driver
Error while jsp connecting to database
jdbc connection to ms sql (urgent)
Finding out the correct URL
DB2 :No suitable driver