Error with Oracle jdbc – ClassNotFoundException

Solving the problem with connecting the jdbc driver for Oracle in Maven. Although the repositories have configs for the Oracle driver, they are not pulled into the project.

When trying to connect to an Oracle database: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

The solution is simple. You need to download the current version of the driver from the Oracle website (for the database version): Oracle Database JDBC Driver

Install the driver in your local repository:
java -cp path\ojdbc7.jar oracle.jdbc.OracleDriver

Then connect the driver in the standard way in pom.xml

Oracle Jdbc connect bean for Spring & ibatis


Related Posts