I am unable to connect to a database using jdbc. Our code always throws a CLassnotfound exception. The RDBMS machine info is given to us by our prof and the user name and password are both user supplied. when testing valid passwords were used. we know this because we used our own. the exception was still thrown and we don't know why.
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection("jdbc:oracle:thin:@ICT158470.ACDM.DS.SAIT.CA:1521:XE",userName, password);
} catch (ClassNotFoundException e1)
{
JOptionPane.showMessageDialog(null,"Connection not made: Check your login info?");
e1.printStackTrace();
}
catch (SQLException e1)
{
e1.printStackTrace();
}