I am getting this exception while deploying my application on Tomcate version:5.5.26
Application type: Web based(Spring).
java version: 1.6
Database: Oracle 10g Exp.
Driver: ojdbc6 (from oracle site for java 1.6)
I am attaching jdbc.properties file. And It is running perfeclty fine from inside Eclipse(3.5.1). I have a test class to check the problem.
Real Exception : org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'oracle.jdbc.driver.OracleDriver' for connect URL '"jdbc:oracle:thin:@localhost:1521:orcl"'
java code: It running fine. Problem is only from Tomcat deployment.
String url = "jdbc:oracle:thin:@localhost:1521:orcl";
String userName = "orbgang";
String password = "admin";
Thanks for the reply.
But why I need that driver in classpath ? Because my application is Web project. All the required libs are in WEB-INF/lib folder. And problem is coming when I am deploying that application on Tomcat.
Brijesh kumar Singh wrote:But why I need that driver in classpath ? Because my application is Web project. All the required libs are in WEB-INF/lib folder. And problem is coming when I am deploying that application on Tomcat.
Have you put the driver jar file in server's "lib" or applications's "lib" directory? If so, do you have any connection factory configuration ?