Skip to Main Content

Oracle Database Express Edition (XE)

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!

ClassNotFoundException: oracle.jdbc.driver.OracleDriver ..

674720May 24 2009
Hello! I am trying to write a java applet that would connect to my database an then execute some queries. When i try to connect to the DB i get ClassNotFoundException: oracle.jdbc.driver.OracleDriver ..
I have found java code for this here(http://www.java2s.com/Code/Java/Database-SQL-JDBC/AppletandOracleJDBC.htm) so i am quite sure that it is not a code problem.
I have checked that ojdbc14.jar file is in C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib and set my CLASSPATH to C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar too (is that ok??? Do i have to download classes12.jar as well?? I have jdk1.6.0_12).
Also i have to tell you that i have written a java program which connects normally to the database and executes any queries without any exception.However,each time i try to run the HTML page with the java applet inside i get ClassNotFoundException: oracle.jdbc.driver.OracleDriver .. exception. When i write java oracle.jdbc.driver.OracleDriver to check if the driver is ok i get an error: Exception in thread 'main' java.lang.NoSuchMethodError :main.
I would appreciate any help.Thanx in advance for any answers...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 21 2009
Added on May 24 2009
0 comments
1,312 views