Spring JDBC Could not load JDBC driver class [oracle.jdbc.driver.OracleDriver] Spring JDBC Could not load JDBC driver class [oracle.jdbc.driver.OracleDriver] spring spring

Spring JDBC Could not load JDBC driver class [oracle.jdbc.driver.OracleDriver]


Make sure that you have ojdbc.jar gets added into your class path. If you want, you can also double check it by opening .classpath file and look for ojdbc.jar entry. If you don't have it, download it from the the maven repo as mentioned below:

        <dependency>            <groupId>com.oracle</groupId>            <artifactId>ojdbc6</artifactId>            <version>11.2.0.3</version>        </dependency>.......    <repositories>        <repository>            <id>codelds</id>            <url>https://code.lds.org/nexus/content/groups/main-repo</url>        </repository>    </repositories>


Download the ojdbc jar from here

Put ojdb6.jar in some folder in your project (let's use lib).

<dependency>    <groupId>com.oracle</groupId>    <artifactId>ojdbc</artifactId>    <version>11.2.0</version>    <scope>system</scope>    <systemPath>${basedir}/lib/ojdbc6.jar</systemPath></dependency>

Then do :

mvn install:install-file \-Dfile=path/to/ojdbc6.jar \-DgroupId=com.oracle \-DartifactId=ojdbc6 \-Dversion=11.2.0 \-Dpackaging=jars


I just put ojdbc6.jar in apache tom cat installation directory in lib directory

D:\TOOLS\apache tomcat server\Tomcat 8.0\lib

It solved my problem.