I have a program that requires the use of the Oracle JDBC connector. Recently however all the machines here have been upgraded too Java JDK 1.8.
I'm getting the following error when I try and use the file ojdbc7.jar
by calling one of the methods.
java.sql.SQLException: No suitable driver found for jdbc:odbc:;Rest of connection details here
I am using the following three lines to access my database object:
//Create new connection to database
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
conn = DriverManager.getConnection(jdbcURL);
stmt = conn.createStatement();
My stack trace is telling me that I am getting an error on the stmt line but I am getting no compilation errors.
I am wondering if either I am using the connector wrong (as I was originally using ojdbc6.jar
but upgraded to see if the latest version would work or if the old version is incompatible?
Aucun commentaire:
Enregistrer un commentaire