You need to move the Oracle ODBC classes driver into Tomcat or into you web apps WEB-INF/lib directory.
Joined: Dec 24, 2002
Dave, I cpoied the ODBC directory, located in "C:\oracle\product\10.1.0\db_1" into "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\jsp-examples\WEB-INF\lib" but it still gives the same error of can't load driver.
The jar files should be present in ORACLE_HOME\jdbc\lib directory
Um, well, I dont know about Oracle 10, but in 9i, its in oracle_home\ora92\jdbc\lib and the jar file is either Classes12.jar or Classes111.jar depending on the driver version you require.
I would suggest that you explore in the Oracle installation directory, search for folders like jdbc/lib and once you find the jars, double click and open with winzip and examine the classnames for OracleDriver.class
you need to place Classes12.jar or Classes111.jar files in tomcat\common\lib directory and you can download these jar files from oracle website.i think they are available in zip format but you have to rename them as jar.
I agree, unless your using a container managed connection pool. If you are then the container needs access to the drivers. In that case tomcat/common/lib is the place to put it.
Correct. And that's because Tomcat uses Jakarta Commons DBCP libraries to instantiate the JDBC Driver class and the Tomcat Classloader hierarchy won't find the driver file unless it's loaded by the same classloader.
However, there is a workaround (& this came up on a discussion on self contained wars..)- if commons-pool-1.2.jar and commons-dbcp-1.2.1.jar are copied into WEB-INF/lib from common/lib (perhaps during an ant build), then these libraries are picked before the ones in /common/lib and the drivers would be loaded properly.
Joined: Dec 24, 2002
Hello, Now am more confused, i did all you said and it still gave the same error and suddenly, it stops given the error. Now i really dont know what solved the problem. pls someone explain to me!
subject: Tomcat and Oracle, will i transfer any file?