<!-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. --> <parameter> <name>maxIdle</name> <value>30</value> </parameter>
<!-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. --> <parameter> <name>maxWait</name> <value>10000</value> </parameter>
<!-- MySQL dB username and password for dB connections -->
<!-- Class name for the official MySQL Connector/J driver --> <parameter> <name>driverClassName</name> <value>com.mysql.jdbc.Driver</value> </parameter>
<!-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. --> <parameter> <name>url</name> <value>jdbc:mysql://localhost:3306/reqxml?autoReconnect=true</value> </parameter> </ResourceParams> </Context>
And I've copied mysql-connector-java-3.0.14-production-bin.jar into my Tomcat common/lib directory.
the filename you mention, mysql-connector-java-3.0.14-production-bin.jar sounds like a download jar? If you open this file, do you see another connectorj jar file inside of it? If so, then you'll need to extract it into common/lib (and remove the parent jar).
err... but more likely:
The names don't match. [ June 02, 2004: Message edited by: Mike Curwen ]
Joined: Oct 05, 2003
OK looks like the problem is a bug in Tomcat. I haven't been able to nail it down completely but basically once you have configured a DataSource you *must* restart Tomcat everytime you re-deploy a WebApp that uses that DataSource- simple undeploying then deploying using the Tomcat ant tasks doesn't work.
This seems to be part of a general problem with Tomcat 5 not undeploying/deploying WebApps properly. I've had similar problems with jsp files where it "find" the jsp but then can't fine the translated (xxx_jsp.java) version after a re-deploy. Both these errors are intermittent: Restarting (and sometimes even re-booting my Mac!) is required to fix it.