JDBC Driver Classpath
I am constantly getting the error that "Couldn't load database driver: oracle.jdbc.driver.OracleDriver "
Now I believe this is due to the fact that something is screwed up with my classpath. However I have the driver in my enviromental classpath and I believe that it needs to go in the classpath that my server is actually using to run my servlet. The problem is however that for some reason tomcat is installed in 2 different locations on my hard drive. c:\jakarta-tomcat-4.0-b5 and another place c:\program files\jtagdemo. Does anyone know why this is? I read in another post that the wrapper.properties file needs to be updated to make my driver work. However the only wrapper.properties file is located in the c:\program files\jtagdemo set of directories while I run Tomcat and my servlets/jsp pages through c:\jakarta-tomcat-4.0-b5.
How can I solve this error that I am getting? Much appreciation.
[931 byte] By [
dUb] at [2007-9-26 2:03:11]

Having the driver archive in your environment classpath won't work. Like you said, it needs to be in the tomcat server's classpath. I'm not too familiar w/ tomcat 4b, but there should be a config file that has all the archives in it. Do a text search in all the tomcat directories for "servlet.jar". They may have changed over to an xml-style config file as apposed to a .properties file like in tomcat 3x.
-Derek
I think the reason is not where the jdbc class file is exists.
open the file %catalina_home%/bin/catalina.bat. about at rowno 70. you will see:
rem -- Set Up The Runtime Classpath -
set CP=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar
if "%JSSE_HOME%" == "" goto noJsse
set CP=%CP%;%JSSE_HOME%\lib\jcert.jar;%JSSE_HOME%\lib\jnet.jar;%JSSE_HOME%\lib\jsse.jar
:noJsse
set CLASSPATH=%CP%
echo Using CATALINA_BASE: %CATALINA_BASE%
echo Using CATALINA_HOME: %CATALINA_HOME%
echo Using CLASSPATH:%CLASSPATH%
echo Using JAVA_HOME:%JAVA_HOME%
that means the catalina does not use the classpath of the os system, it makes one by itself. I am using oracle816, oracle jdbc class file is G:\orant\jdbc\lib\classes12.zip. so I change the catalina.bat file as this:
.....
rem -- Set Up The Runtime Classpath -
set CP=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar;G:\orant\jdbc\lib\classes12.zip
if "%JSSE_HOME%" == "" goto noJsse
set CP=%CP%;%JSSE_HOME%\lib\jcert.jar;%JSSE_HOME%\lib\jnet.jar;%JSSE_HOME%\lib\jsse.jar
:noJsse
set CLASSPATH=%CP%
echo Using CATALINA_BASE: %CATALINA_BASE%
echo Using CATALINA_HOME: %CATALINA_HOME%
echo Using CLASSPATH:%CLASSPATH%
echo Using JAVA_HOME:%JAVA_HOME%
.....
then the tomcat can run properly. Is this right?