Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

unreported exception during connection

185708Jun 12 2002
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 10 2002
Added on Jun 12 2002
1 comment
210 views