Hello,
I am getting a java.sql.SQLException: No suitable driver when I am trying to connect to a database with Java. I am on Mac OS 10.5 using the NetBeans IDE. It seems to be having trouble with the EmbeddedDriver, but I'm not sure what I am missing:
public class A
{
Connection conn = null;
public A(String URL, String username, String password) throws SQLException
{
try
{
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
conn = DriverManager.getConnection(URL, username, password);
}
catch (SQLException sqlException)
{
sqlException.printStackTrace();
invalidate();
}
catch (ClassNotFoundException classNotFound)
{
classNotFound.printStackTrace();
invalidate();
}
}
}