I can't seem to get a JNDI reference to a MySQL database from Tomcat.

Following the instructions in the tutorial,
http://developer.java.sun.com/develo...02/June02.html
Context initCtx = new InitialContext();
initCtx.addToEnvironment(Context.INITIAL_CONTEXT_F ACTORY,
"com.sun.jndi.fscontext.RefFSContextFactory");
DataSource ds = (DataSource) initCtx.lookup("jdbc/TestDB");
I get the following error:
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

I am not alone in this difficulty with JNDI and Tomcat. There appeared to
be a bug last June configuring Tomcat with JNDI according to this post:
http://dbforums.com/showthread.php?threadid=396944
After following those settings :
Context initCtx = new InitialContext();
Context envCtx = (Context)initCtx.lookup("java:comp/env");
DataSource ds = (DataSource)envCtx.lookup("jdbc/TestDB");
I get the followign Error:
javax.naming.NamingException: Exception creating DataSource:
org.hsql.jdbcDriver
at
org.apache.naming.factory.TyrexDataSourceFactory.g etObjectInstance(TyrexDataSourceFactory.java:227)
at
org.apache.naming.factory.ResourceFactory.getObjec tInstance(ResourceFactory.java:165)

I am running the following software:
MySQL - 3.23.52
MySQL Connector 2.0.14
Tomcat - 4.0.4
Java 1.3.1

I have copied mysql-connector-java-2.0.14-bin.jar to
$TOMCAT_HOME/common/lib, and I have replace
$TOMCAT_HOME/common/lib/jdbc2_0-stdext.jar with the jar that comes with
mysql-connector-java-2.0.14.

I added the following to the MySqlTest web.xml file:
<resource-ref id="ResourceRef_TestDB">
<description>DB Connection</description>
<res-ref-name>jdbc/TestDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

I added the following to my server.xml file:
<!-- Test JDBC to MySql -->
<Context path="/MySqlTest" docBase="MySqlTest"
debug="99" reloadable="true" crossContext="true">

<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_DBTest_log." suffix=".txt"
timestamp="true"/>

<Resource name="jdbc/TestDB"
auth="Container"
type="javax.sql.DataSource"/>

<ResourceParams name="jdbc/TestDB">
<parameter>
<name>factory</name>
<!
--<value>org.apache.commons.dbcp.BasicDataSourceFact ory</value>-->
<value>com.sun.jndi.fscontext.RefFSContextFactor y</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30000</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>100</value>
</parameter>
<parameter>
<name>username</name>
<value>javauser</value>
</parameter>
<parameter>
<name>password</name>
<value>javadude</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/javatest</value>
</parameter>
<!-- OLD VALUES
<parameter>
<name>driverClassName</name>
<<value>org.gjt.mm.mysql.Driver</value>
</parameter>
-->
<!-- NEW VALUES FROM
http://dbforums.com/showthread.php?threadid=396944 -->
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.jdbc2.optional.MysqlDataSo urce</value>
</parameter>
</ResourceParams>
</Context>
</Host>

Any ideas?