tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Yin <y_zha...@encs.concordia.ca>
Subject Re: Cannot create JDBC driver of class '' for connect URL 'null'"
Date Sun, 05 Nov 2006 01:30:32 GMT
Hi Guys,

I just found out the reason. My index.jsp in the the Root directory, 
however,  the path of the sever.xml/context is "/DBTest".

thanks for all the help.

Eric.

Quoting Eric Yin <y_zhaoer@encs.concordia.ca>:

> 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.
>
> thanks,
>
> Eric.
>
>
> Quoting Christopher Schultz <chris@christopherschultz.net>:
>
>> 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
>>> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
>>> 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:
>>
>> http://dev.mysql.com/doc/refman/4.1/en/connector-j-reference-configuration-properties.html
>>
>> 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: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message