Java Mailing List Archive

Home » Home (12/2007) » Tomcat Users »

Tomcat 5 - Cannot load JDBC driver class 'null' SQL state: null

christopher justin


A solution to this problem would be greatly appreciated. I have now spent
over 10 hours investigating this problem, and still have no solution. We
have installed Tomcat 5 and the latest MySQl ConnectorJ driver on 3
different platforms, and experience this annoying, what seems to be common
problem, yet no solution with Tomcat 5. I have configured, re-configured,
followed discussion forems (mainly related to Tomcat 4). The mysql
connectorJ jar file is in $CATALINA/common/lib like stated at
. There something not documented or clear in the docs, as many people are
having this issue.

Here is the SQLException

Error: java.sql.SQLException: Cannot load JDBC driver class 'null' SQL
state: null

Here is a snap shot of the server.xml file:
  <Environment description="Absolute Pathname of the JWSDP Installation"
name="jwsdp.home" override="true" type="java.lang.String"
  <Environment name="simpleValue" override="true" type="java.lang.Integer"
  <!-- Editable user database that can also be used by UserDatabaseRealm
to authenticate users -->
  <Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase" description="User database that can
be updated and saved">
  <ResourceParams name="UserDatabase">

  <Context path="/AuthorizedTest" docBase="AuthorizedTest" debug="5"
reloadable="true" crossContext="true">
  <Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_DBTest_log." suffix=".txt" timestamp="true"/>

  <Resource name="jdbc/AuthorizedTest"

  <ResourceParams name="jdbc/AuthorizedTest">

  <!-- Maximum number of dB connections in pool. Make sure you
     configure your mysqld max_connections large enough to handle
     all of your db connections. Set to 0 for no limit.

  <!-- Maximum number of idle dB connections to retain in pool.
     Set to 0 for no limit.

  <!-- 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.

  <!-- MySQL dB username and password for dB connections -->

  <!-- Class name for mm.mysql JDBC driver -->

  <!-- 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
     connection. mysqld by default closes idle connections after 8

Here is a snap shot of our WEB-INF/web.xml file:
   <description>DB Connection</description>

Does anyone have a successful Tomcat 5 and MySQL Connector J configuration?
In desparate need of the correct configuration. Thanks all.


Make your home warm and cozy this winter with tips from MSN House & Home.

To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)

©2008 - Jax Systems, LLC, U.S.A.