Possible Solution:
Check the database lookup entry in either context.xml or server.xml
In Tomcat 5.5.9 there are no <ResouceParams> tag and the parameters are passed alongiwth the resource tag.
e.g Resource Entry in Tomcat 5.5.9
<resource name="jdbc/XYZ"
auth="Container"
scope="Shareable"
type="javax.sql.DataSource"
driverclassname="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1521:XYZ"
username="xyz"
password="xyz"
maxactive="10"
maxidle="100"
maxwait="3000">
</resource>
In Tomcat 5.0.28
<resource name="jdbc/XYZ" scope="Shareable" type="javax.sql.DataSource">
<resourceparams name="jdbc/XYZ">
<parameter>
<name>factory</name>
<value>
org.apache.commons.dbcp.BasicDataSourceFactory
</value>
</parameter>
<!-- DBCP database connection settings -->
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1521:XYZ</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>username</name>
<value>xyz</value>
</parameter>
<parameter>
<name>password</name>
<value>xyz</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>3000</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>100</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
</resourceparams>
</resource>
One Last Point: Dont forget to put your classes12.jar/ojdbc14.jar file in
Two useful links which help me discover this.. :-) (after I had already wasted a lot of time)
1. Java Forums
2. Tomcat Docs
No comments:
Post a Comment