Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 99287 invoked from network); 23 Sep 2007 07:09:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Sep 2007 07:09:07 -0000 Received: (qmail 25169 invoked by uid 500); 23 Sep 2007 07:08:45 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 25142 invoked by uid 500); 23 Sep 2007 07:08:45 -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 25130 invoked by uid 99); 23 Sep 2007 07:08:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Sep 2007 00:08:45 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Sep 2007 07:08:45 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IZLZo-0004pp-1P for users@tomcat.apache.org; Sun, 23 Sep 2007 00:08:24 -0700 Message-ID: <12843354.post@talk.nabble.com> Date: Sun, 23 Sep 2007 00:08:24 -0700 (PDT) From: fdehghani To: users@tomcat.apache.org Subject: Re: tomcat can not connect to MySql In-Reply-To: <46F58318.6060404@cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: dehghani_fatemeh@yahoo.com References: <12834957.post@talk.nabble.com> <46F58318.6060404@cornell.edu> X-Virus-Checked: Checked by ClamAV on apache.org Tomcat 5.5.9 OS Windows Server 2003 , Windows XP Mysql 5.0 tomcat and mysql on the same server javax.transaction.SystemException com.met.data.factory.user.UserFactory.getUser(UserFactory.java:694) com.met.action.LoginAction.execute(LoginAction.java:56) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) com.met.filter.CharsetFilter.doFilter(CharsetFilter.java:31) any connection closed after open it -- Fatemeh David Smith-2 wrote: > > Can you provide some specifics of your environment? > > Tomcat version > OS > Mysql version (both driver and server) > Both tomcat and mysql on the same machine? > If not, any firewalls that might be timing out a connection? > How long does it run before it doesn't work? > Can you post the full stack trace of your exception including root cause? > In your design, are you holding on to connections or closing them as > soon as you are done talking to the db? > > Mysql server does timeout connections after 8 hours by default. If you > are using tomcat's database pooling, this can be fixed with the simple > addition of a validation query in the config. In any case, it's best > practice for the code querying the db to close connections as soon as > reasonably possible and not keep them open. > > --David > > --------------------------------------------------------------------- > 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 > > > -- View this message in context: http://www.nabble.com/tomcat-can-not-connect-to-MySql-tf4500426.html#a12843354 Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- 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