wood burning stoves 2.0*
The moose likes JDBC and the fly likes JDBC Driver error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC Driver error" Watch "JDBC Driver error" New topic
Author

JDBC Driver error

Srivatsan Sampath
Greenhorn

Joined: Mar 07, 2001
Posts: 1
Hai,
I installed J2EE, JDK1.3, set the path for J2EE_PATH to point to the j2ee bin directory, JAVA_HOME to point to the directory where JDK1.3.1 is installed and also set the ANT_HOME. According to the J2EE documentation I need not set anything in default.properties to access the cloudscape database.
I wrote this piece of code and I get a ClassNotFoundException : COM.cloudscape.core.JDBCDriver.
import java.awt.event.*;
import java.util.*;
import java.sql.*;

public class HelloJdbc extends Object{
private Connection connection;

public HelloJdbc()
{
String url = "jdbc:cloudscape rojects;create=true";
String Username = "";
String Password = "";
try{
Class.forName("COM.cloudscape.core.JDBCDriver").newInstance();
}
catch( Exception E)
{
System.err.println("Unable to load driver.");
E.printStackTrace();
}

try {
Connection c = DriverManager.getConnection(
url, Username, Password);
}
catch(SQLException sqlex) {
System.err.println(" SQL Error");
sqlex.printStackTrace();
System.exit(1);
}
}
public static void main(String[] args)
{
HelloJdbc HJ = new HelloJdbc();
}
}
Any suggestions.
Thanks
Sri
Daniel Dunleavy
Ranch Hand

Joined: Mar 13, 2001
Posts: 276
I would think it can't find the driver
Maybe try this
java -Djdbc.drivers=COM.cloudscape.core.JDBCDriver
applicationClass
also look at here
Dan
[This message has been edited by Daniel Dunleavy (edited June 28, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC Driver error
 
Similar Threads
MySql connection issue
JDBC and Cloudscape
Can't connect to Access database using Cloudscape
Java-Xml file not getting Connected to DataBase
Connection with database Help