tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Yin <>
Subject Re: Cannot create JDBC driver of class '' for connect URL 'null'"
Date Sun, 05 Nov 2006 00:53:34 GMT
Hi Chris,

Thanks for the help.

After I move the Connector/J 5.0 to the Tomcat's server-wise common/lib 
directory and remove the autoReconnect=true, i still get the same error.



Quoting Christopher Schultz <>:

> Eric,
> Eric Yin wrote:
>> Hi,
>> I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
>> i'm doing the same thing as
>> and i got this error.
> Where did you put mysql-connector-*.jar? I suspect that you have it in
> your webapp's lib directory, but you need to have it in Tomcat's
> server-wise common/lib directory.
> Another note:
>> url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>
> Since you are using a DataSource which defaults to the Jakarta Commons
> DBCP pool, you should remove the "autoReconnect=true" from your URL;
> re-connection is handled by the DPCP library, so you /should be/ able to
> safely remove this parameter. This feature is documented to be
> undesirable as seen here:
> For the lazy: (emphasis added by me)
> "Should the driver try to re-establish stale and/or dead connections? If
> enabled the driver will throw an exception for a queries issued on a
> stale or dead connection, which belong to the current transaction, but
> will attempt reconnect before the next query issued on the connection in
> a new transaction. *The use of this feature is not recommended, because
> it has side effects related to session state and data consistency when
> applications don'thandle SQLExceptions properly, and is only designed to
> be used when you are unable to configure your application to handle
> SQLExceptions resulting from dead andstale connections properly*.
> Alternatively, investigate setting the MySQL server variable
> "wait_timeout"to some high value rather than the default of 8 hours."
> -chris

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message