I'm having trouble accessing a database connection after war
redeployment. I've read the documentation several times and went
through suggestions posted in the mailing lists, but nothing has worked.
I prefer the approach of having the context.xml file in the META-INF
directory in the war itself. When I try this, I get the infamous
"Cannot create JDBC driver of class '' for connect URL 'null'" error
message. When I put the <context> element back into the server.xml
file, everything is fine, except for the fact that I can't redeploy the
war file without restarting Tomcat. This is very frustrating and
time-consuming. Does anyone know why the context.xml file is not
working for me? I've included the contents of this file below. I'm
using Tomcat 5.0.19.
Thanks in advance.
Chad
<Context debug="0" docBase="h" path="/h" privileged="false"
reloadable="false">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_h_log." suffix=".txt"
timestamp="true"/>
<Resource name="jdbc/myPool" auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/myPool">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>
<parameter>
<name>logAbandoned</name>
<value>true</value>
</parameter>
<parameter>
<name>username</name>
<value>...</value>
</parameter>
<parameter>
<name>password</name>
<value>...</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.inet.tds.TdsDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>...</value>
</parameter>
</ResourceParams>
</Context>