Hello,
I got "java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver"
when trying to load Oracle driver using "Class.forName
("oracle.jdbc.driver.OracleDriver");"
I'm using Windows XP with Oracle 10g client installed, and I've checked
class12.jar and OJDBC14.jar exist under C:\Oracle_Install_Dir_Path\jdbc\lib
The test code looks like:
import java.sql.*;
public class Essential_JDBC {
public static void main (String[] args)
{
try {
//Load Oracle driver
Class.forName ("oracle.jdbc.driver.OracleDriver");
}
catch (ClassNotFoundException cnfe){
System.err.println(cnfe);
}
catch (SQLException sqle)
{
System.err.println(sqle);
}
}
}
Roedy Green - 30 Jan 2006 06:28 GMT
>ClassNotFoundException
see http://mindprod.com/jgloss/caq.html
It simply can't find the JDBC driver.
check your oracle docs to make sure you have the driver's name right
and the Oracle JDBC driver jar is on your classpath or in the ext
directory, or whatever the install says you have to do to get it
visible.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Roedy Green - 30 Jan 2006 06:46 GMT
>I got "java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver"
>when trying to load Oracle driver using "Class.forName
>("oracle.jdbc.driver.OracleDriver");"
See wassup to dump the classpath you are actually using at that point
in your code. System.getProperty ("java.library.path"):
Recall that a jar being in a directory where the directory is on the
classpath is not sufficient.
Then use jarlook to see if that driver is in the jar you think it is.
See http://mindprod.com/applets/wassup.html
http://mindprod.com/products1.html#JARLOOK

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.