permaculture playing cards*
The moose likes JDBC and the fly likes Class connection not found 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 "Class connection not found" Watch "Class connection not found" New topic
Author

Class connection not found

L. Riley
Greenhorn

Joined: Mar 20, 2001
Posts: 28
I am trying to display records from a Cloudscape database. When my page tries to display I get an error message that ends with 61: Class connection not found.
I have checked my classpath and I am not sure where to look from here...
Will someone give me a hint what might be wrong here?
Thank you.
Lee Wallen
Greenhorn

Joined: Jul 14, 2001
Posts: 10
make sure that you import java.sql.* or java.sql.Connection.
import java.sql.*;
public class TestConn {
public static void main (String args []) {
try {
String dbUrl = args[0];
String driverName = args[1];

Class.forName(driverName).newInstance();
Connection con =
DriverManager.getConnection(dbUrl, "", "");
System.out.println("conn.isClosed = " + conn.isClosed());
} catch (Exception e) {
e.printStackTrace();
}
}
}
[This message has been edited by Lee Wallen (edited July 15, 2001).]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Class connection not found
 
Similar Threads
creating one jdbc configuration file for the entire web applicaton
Invaild Cursor State
Servlets classes not compiling!.
Android TCP connection
connecting to ms access database