Return-Path: Delivered-To: apmail-incubator-esme-dev-archive@minotaur.apache.org Received: (qmail 99705 invoked from network); 4 Feb 2010 17:25:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Feb 2010 17:25:56 -0000 Received: (qmail 39833 invoked by uid 500); 4 Feb 2010 17:25:56 -0000 Delivered-To: apmail-incubator-esme-dev-archive@incubator.apache.org Received: (qmail 39768 invoked by uid 500); 4 Feb 2010 17:25:56 -0000 Mailing-List: contact esme-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: esme-dev@incubator.apache.org Delivered-To: mailing list esme-dev@incubator.apache.org Received: (qmail 39758 invoked by uid 99); 4 Feb 2010 17:25:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2010 17:25:56 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of esjewett@gmail.com designates 209.85.216.174 as permitted sender) Received: from [209.85.216.174] (HELO mail-px0-f174.google.com) (209.85.216.174) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2010 17:25:44 +0000 Received: by pxi4 with SMTP id 4so2977263pxi.32 for ; Thu, 04 Feb 2010 09:25:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=+ZAXHPXM2z4bKiAJ7+SR1Az90WzSwS6oPeQc6Rb1+oE=; b=W71UOI31t3450Jc2TmzyDRqE0QtALBBUskflmfvjITQz87Bg0dn8CJORvD2Sw+py3C D0g5pZ1nXKoF6MkH8YO4g3Z/OF/pcYQP041z9Tiw1eHuc9br3s6uO0TrWDlpIjR+Tgv2 L4ie8BU00tFrV4t6dPF8EALfWZfv8kDW40YyU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=lgRW8P7DwzQyHy+vHCJnxRrlYsCz2Cde4JoBQrSqKwe3ZLoAXzT0leqHUr1qj0N8Yd uoEf0KAia0PUDMafVW/Ovm/sKD26GT4XwF/RvmPPrIHOdoutFNSNYogDd5D+zaEtRIpH pzdMAkCodV2L8skz+te0eNrDWNeHHIlXEo9Fw= MIME-Version: 1.0 Received: by 10.141.2.14 with SMTP id e14mr957227rvi.56.1265304323197; Thu, 04 Feb 2010 09:25:23 -0800 (PST) In-Reply-To: References: <94464.36641.qm@web44909.mail.sp1.yahoo.com> Date: Thu, 4 Feb 2010 12:25:23 -0500 Message-ID: <68f4a0e81002040925t63374055r238331ce362740c1@mail.gmail.com> Subject: Re: Tomcat/ESME: Shutdown Problems From: Ethan Jewett To: esme-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I've added this info to the Jira ticket. Uday, if you want to add more detail to the Jira ticket (or even submit a patch for the issue to the ticket...), that would be great! Ethan On Thu, Feb 4, 2010 at 10:56 AM, Richard Hirsch wro= te: > I just looked and if we want to use the StandardDBVendor we will have > to rewrite the object DBVendor to use the StandardDBVendor. > > Here is a blog with details / examples: > http://jgoday.wordpress.com/2009/12/25/lift-testing-with-dbunit-and-specs= / > > This means it goes in the next release. > > D. > > On Thu, Feb 4, 2010 at 4:36 PM, Richard Hirsch wr= ote: >> sorry. That isn't going to work. >> >> We need to use the StandardDBVendor class first. >> >> On Thu, Feb 4, 2010 at 4:34 PM, Richard Hirsch w= rote: >>> LiftRules.unloadHooks.append(() =3D> dbVendor.closeAllConnections_!()) >>> >>> "dbVendor" instead of "DBVendor" >>> --------------- >>> http://wiki.liftweb.net/index.php/FAQ >>> >>> How do I execute code when my application is unloaded? >>> >>> You can define methods to be called when Lift is unloaded via the >>> LiftRules object in the Boot class. >>> >>> For example: >>> >>> def myUnloader(): Unit =3D { >>> =A0// run when Lift is being unloaded >>> } >>> >>> LiftRules.unloadHooks +=3D myUnloader _ >>> >>> >>> >>> On Thu, Feb 4, 2010 at 4:24 PM, Uday Subbarayan >>> wrote: >>>> I am new to Scala. I need some time to make this work. I changed this = line of code to, >>>> >>>> [WARNING] /home/uday/projects/M1/Prototype/esme/esme/trunk/server/src/= main/scala/bootstrap/liftweb/Boot.scala:300: error: value closeAllConnectio= ns_! is not a member of object bootstrap.liftweb.DBVendor >>>> >>>> [WARNING]=A0=A0=A0=A0 LiftRules.unloadHooks.append(() =3D> DBVendor.cl= oseAllConnections_!()) >>>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = ^ >>>> [WARNING] one error found >>>> >>>> & build FAILS. >>>> >>>> I put it under, >>>> >>>> def releaseConnection(conn: Connection): Unit =3D synchronized { >>>> =A0=A0=A0 pool =3D conn :: pool >>>> =A0=A0=A0 LiftRules.unloadHooks.append(() =3D> DBVendor.closeAllConnec= tions_!()) >>>> =A0=A0=A0 notify >>>> =A0 } >>>> >>>> & NOT sure whether this is the right place too. >>>> >>>> Best, >>>> Uday. >>>> ------------------------- >>>> >>>> I do not blog but e-write: >>>> >>>> http://uds-web.blogspot.com >>>> >>>> --- On Thu, 2/4/10, Richard Hirsch wrote: >>>> >>>> From: Richard Hirsch >>>> Subject: Re: Tomcat/ESME: Shutdown Problems >>>> To: esme-dev@incubator.apache.org >>>> Date: Thursday, February 4, 2010, 3:58 AM >>>> >>>> More ideas from the lift list: >>>> >>>> "You can also add to Boot.scala (given that the StandardDBVendor is >>>> called dbVendor): >>>> >>>> LiftRules.unloadHooks.append(() =3D> dbVendor.closeAllConnections_!()) >>>> >>>> What this will do is close all the DB connections when the context is = unloaded. >>>> >>>> Additionally, you can switch to H2 which is generally more stable than= Derby >>>> in my experience." >>>> >>>> Why don't you try adding the line above to Boot.scala to see if it hel= ps. >>>> >>>> I've also added a Jira item to deal with the problem: >>>> https://issues.apache.org/jira/browse/ESME-155 >>>> >>>> D. >>>> >>>> >>>> >>>> On Wed, Feb 3, 2010 at 11:05 PM, Uday Subbarayan >>>> wrote: >>>>> Tomcat didn't shutdown. I did kill -9 on the process. >>>>> >>>>> Uday. >>>>> >>>>> ------------------------- >>>>> >>>>> I do not blog but e-write: >>>>> >>>>> http://uds-web.blogspot.com >>>>> >>>>> --- On Wed, 2/3/10, Richard Hirsch wrote: >>>>> >>>>> From: Richard Hirsch >>>>> Subject: Re: Tomcat/ESME: Shutdown Problems >>>>> To: esme-dev@incubator.apache.org >>>>> Date: Wednesday, February 3, 2010, 8:00 PM >>>>> >>>>> I got a comment back from David Pollack on the lift list: >>>>> >>>>> http://groups.google.com/group/liftweb/browse_thread/thread/bf498414b= 18d4226/4299ce36a03749f0?show_docid=3D4299ce36a03749f0 >>>>> >>>>> Was the tomcat process really shutdown or did it hang and you had to = kill it. >>>>> >>>>> D. >>>>> >>>>> On Wed, Feb 3, 2010 at 8:41 PM, Richard Hirsch wrote: >>>>>> No problem in jetty but I remember having problems on occasion with >>>>>> derby and tomcat. If I remember correctly, I sometimes had problems >>>>>> during hot deploys. >>>>>> >>>>>> D. >>>>>> >>>>>> On Wed, Feb 3, 2010 at 7:54 PM, Uday Subbarayan >>>>>> wrote: >>>>>>> Thanks. Did you try to shutting down & starting your container with= ESME? Just want to make sure that it's not my local environment problem. >>>>>>> >>>>>>> Best, >>>>>>> Uday. >>>>>>> >>>>>>> ------------------------- >>>>>>> >>>>>>> I do not blog but e-write: >>>>>>> >>>>>>> http://uds-web.blogspot.com >>>>>>> >>>>>>> --- On Wed, 2/3/10, Richard Hirsch wrote: >>>>>>> >>>>>>> From: Richard Hirsch >>>>>>> Subject: Re: Tomcat/ESME: Shutdown Problems >>>>>>> To: esme-dev@incubator.apache.org >>>>>>> Date: Wednesday, February 3, 2010, 6:13 PM >>>>>>> >>>>>>> looks like a lift problem that might be occur when the container sh= uts down.. >>>>>>> >>>>>>> I just posted on the issue on the Lift Google Group. I'm hopeful th= at >>>>>>> someone there has an idea. >>>>>>> >>>>>>> D. >>>>>>> >>>>>>> >>>>>>> On Wed, Feb 3, 2010 at 4:30 PM, Uday Subbarayan >>>>>>> wrote: >>>>>>>> After I shutdown Tomcat, i see that there is lot's of stack trace = in the log file. I also noticed that derby is not getting shutdown. Next ti= me, when i restart Tomcat, ESME fails to load. I get all kinds of exception= in the browser. >>>>>>>> >>>>>>>> Once i manually kill -9 on the java process then everything works = fine.. Here is the (partial) stack trace from the log file. Yahoo email is = not allowing me to post full stack. >>>>>>>> >>>>>>>> Best, >>>>>>>> Uday. >>>>>>>> >>>>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>>>>> SEVERE: >>>>>>>> A web application created a ThreadLocal with key of type >>>>>>>> [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@13f79f7]) an= d a >>>>>>>> value of type [org.apache.derby.iapi.services.context.ContextManag= er] >>>>>>>> (value [org.apache.derby.iapi.services.context.ContextManager@b52a= 28]) >>>>>>>> but failed to remove it when the web application was stopped. To >>>>>>>> prevent a memory leak, the ThreadLocal has been forcibly removed. >>>>>>>> Feb 3, 2010 7:04:57 AM >>>>>>>> =A0org.apache.coyote.http11.Http11Protocol destroy >>>>>>>> INFO: Stopping Coyote HTTP/1.1 on http-8080 >>>>>>>> Exception in thread "pool-2-thread-14" java.lang.NullPointerExcept= ion >>>>>>>> =A0=A0=A0 at scala.runtime.BoxesRunTime.boxToLong(Unknown Source) >>>>>>>> =A0=A0=A0 at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$wrapQ= uery$1.apply(S.scala:972) >>>>>>>> =A0=A0=A0 at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$wrapQ= uery$1.apply(S.scala:972) >>>>>>>> =A0=A0=A0 at scala.List.foreach(List.scala:841) >>>>>>>> =A0=A0=A0 at net.liftweb.http.S$.net$liftweb$http$S$$wrapQuery(S.s= cala:972) >>>>>>>> =A0=A0=A0 at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$_nest= 2InnerInit$1$$anonfun$apply$25.apply(S.scala:1109) >>>>>>>> =A0=A0=A0 at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.sc= ala:906) >>>>>>>> =A0=A0=A0 at net.liftweb.http.S$$anonfun$net$liftweb$http$S$$doAro= und$1..apply(S.scala:907) >>>>>>>> =A0=A0=A0 at >>>>>>>> =A0net.liftweb.mapper.MetaProtoExtendedSession$myWrapper$.apply(Pr= otoExtendedSession.scala:80) >>>>>>>> =A0=A0=A0 at net.liftweb.http.S$.net$liftweb$http$S$$doAround(S.sc= ala:907) >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> >>> >> >