Chris,
Can you try and verify if your context.xml is being processed. One way to do this is to make it malformed (ie. Put an unclosed tag in it) and see if Tomcat complains. If it doesn't complain, then you need to find out why it isn't being processed.
-R

Chris Marshall wrote:
Hi Richard,
Thanks for the rapid response.

The MySql driver is in the tomcat/lib directory which I think is
correct for Tomcat 6, and it works fine without the jndi pooling. The
dbcp jars are bundled in tomcat-dbcp.jar in Tomcat 6, but I have also
tested with the individual jars without success.
I have tried modifying the Resource tag as you suggest, also without success.

The puzzling thing is that it all works (well) without jndi so the
dbms and jdbc side is OK. However it would be preferable to access the
dbms resource via jndi if possible.
I have read and reread the Apache documents including a specific MySql howto at
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
and am running out of ideas!!

Regards Chris

On 25/07/2008, Richard Yee <[EMAIL PROTECTED]> wrote:
Chris,
I think you are missing the factory attribute in your Resource tag in your
context.xml

       <Resource name="jdbc/MyDb"

factory"org.apache.commons.dbcp.BasicDataSourceFactory"
               auth="Container"
               type="javax.sql.DataSource"
               maxActive="100" maxIdle="30" maxWait="10000"
               username="xx" password="yy"
               driverClassName="com.mysql.jdbc.Driver"

url="jdbc:mysql://localhost:3306/MyDb?autoReconnect=true"/>

Do you have your mysql-connector and dbcp jar files in your tomcat's
common/lib directory?

-Richard



Reply via email to