That's a very good question. I had a fully functional configuration
using Tomcat 4.1.30, which worked flawlessly. Then, I moved the *same*
configuration to my Tomcat 5 instance, moved the code, moved
configuration, moved required libraries into all the places where they
were supposed to be, and.... Tomcat cannot instantiate the data source.
It appears that it's unable to load the resource parameters, since it's
trying to instantiate a data source of class '' and url 'null'.
However, the rest of the application does load correctly.
By the way, out of curiosity, are you using JRE 1.5 or JDK 1.4.2 with
compat libraries?
Thanks!
> Why should connection pooling not work in Tomcat 5 when you have all the
> required libs in your <tomcat_home>/common/lib folder? The connection
> pooling should work always, you must configure the datasource in your
> serverside configuration file. I've made a small help document in German for
> me, where the configuration of a resource is explained. Here I use the test
[quoted text clipped - 24 lines]
> > apparently. Please let me know if anyone figures out how to make this
> > work in Tomcat 5. Thanks!!!
Daniel Rohe - 05 Jan 2005 22:33 GMT
Currently I have Tomcat 5.0 with JDK 1.4.2_06 on WinXP machine running. On
my machine there is a web application with MySQL database, Hibernate ORM and
Struts frontend and it works perfect. I've only copied the MySQL JDBC driver
to <tomcat_home>/common/lib. the commons-dpcp is already there.
Are you using Tomcat 5.5 or Tomcat 5.0?
Here is my configuration of the jUDDI application, maybe this helps
<Resource name="jdbc/juddiDB" auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/juddiDB">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>5</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>username</name>
<value>juddi</value>
</parameter>
<parameter>
<name>password</name>
<value>********</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/juddi?autoReconnect=true</value>
</parameter>
<parameter>
<name>validationQuery</name>
<value>select count(*) from PUBLISHER</value>
</parameter>
</ResourceParams>
> That's a very good question. I had a fully functional configuration
> using Tomcat 4.1.30, which worked flawlessly. Then, I moved the *same*
[quoted text clipped - 49 lines]
> this
>> > work in Tomcat 5. Thanks!!!
steepyirl - 12 Jan 2005 17:07 GMT
Looks good. I'm connecting to two SQL Server DBs through dbcp. I have
no specialized bean container or anything like that, and I'm using
Tomcat 5.5. My resource configuration is almost identical to yours.
Thanks!