unreported exception during connection
hi all,
I am trying to connect to the database.I am using
Class.forName("oracle.jdbc.driver.OracleDriver");
connection = DriverManager.getConnection(driver+"@"+host+":"+port+":"+serverID,userID,password);
statement = connection.createStatement();
but i am getting the following error.
Error(105,16): unreported exception: java.lang.ClassNotFoundException; must be caught or declared to be thrown
I tried making the following changes:
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
connection = DriverManager.getConnection(driver+"@"+host+":"+port+":"+serverID,userID,password);
statement=connection.createStatement();
but got the following error
Error(110,55): cannot access class oracle.jdbc.driver.OracleDriver; file oracle\jdbc\driver\OracleDriver.class not found
I am using the jdevloper9i rc2 and have been working on this project for some time now but didnt got any of the above errors in the different modules of the project when i used any of the above statements,The above errors never occured before.
Also i did checked my classpath for the classes.jar which was set as
c:/<jdev direc>/jdbc/lib/classes12.jar
kindly suggest..
regards,
nikhil