Siddharth Jain
Siddharth Jain

Reputation: 3

classNotFoundException when trying to use Oracle JdbcOdbcDriver

I have successfully installed an ODBC driver. I am trying to connect to an Oracle 10g database using Netbeans 7.0.

During connectivity it says "Driver class missing".

How can this be fixed?

Error:

java.lang.classNotFoundException:oracle.jdbc.odbc.JdbcOdbcDriver

try
{
    // Load the JDBC driver       
    String driverName = "oracle.jdbc.odbc.JdbcOdbcDriver";
    Class.forName(driverName);           
    connection = DriverManager.getConnection("jdbc:odbc:placement");
    JOptionPane.showMessageDialog(null,"Connection Established");

     ///unrelated code snipped            
}    

Upvotes: 0

Views: 1721

Answers (1)

Luke Woodward
Luke Woodward

Reputation: 64949

I think you've got the name of the class wrong. Try sun.jdbc.odbc.JdbcOdbcDriver instead.

Upvotes: 3

Related Questions