Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 69556 invoked from network); 5 Nov 2006 01:31:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Nov 2006 01:31:09 -0000 Received: (qmail 80175 invoked by uid 500); 5 Nov 2006 01:31:09 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 79994 invoked by uid 500); 5 Nov 2006 01:31:09 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 79983 invoked by uid 99); 5 Nov 2006 01:31:09 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Nov 2006 17:31:09 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [132.205.96.94] (HELO perseverance.services.encs.concordia.ca) (132.205.96.94) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Nov 2006 17:30:56 -0800 Received: from localhost (nul-web@tact-96.encs.concordia.ca [132.205.96.48]) by perseverance.services.encs.concordia.ca (8.13.7/8.13.7) with ESMTP id kA51UXbw022215 for ; Sat, 4 Nov 2006 20:30:35 -0500 X-Received-HTTP: from chinook.ciise.concordia.ca (chinook.ciise.concordia.ca [132.205.100.81]) by mail.encs.concordia.ca (Horde MIME library) with HTTP; Sat, 04 Nov 2006 20:30:32 -0500 Message-ID: <20061104203032.qcdcj6t07oqskwoo@mail.encs.concordia.ca> Date: Sat, 04 Nov 2006 20:30:32 -0500 From: Eric Yin To: users@tomcat.apache.org Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null'" References: <20061103122458.nlw845h77qoswk8k@mail.encs.concordia.ca> <454BB7BF.8010704@christopherschultz.net> <20061104195334.hobb29ic0fswsco8@mail.encs.concordia.ca> In-Reply-To: <20061104195334.hobb29ic0fswsco8@mail.encs.concordia.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.5) X-Scanned-By: MIMEDefang 2.43 on perseverance.encs.concordia.ca at 2006/11/04 20:30:35 EST X-Virus-Checked: Checked by ClamAV on apache.org 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 : > 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 : > >> 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