Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 9597 invoked from network); 19 Sep 2007 10:57:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Sep 2007 10:57:38 -0000 Received: (qmail 74624 invoked by uid 500); 19 Sep 2007 10:57:29 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 74334 invoked by uid 500); 19 Sep 2007 10:57:29 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 74323 invoked by uid 99); 19 Sep 2007 10:57:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2007 03:57:29 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [216.86.168.179] (HELO mxout-04.mxes.net) (216.86.168.179) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2007 10:57:26 +0000 Received: from [192.168.0.125] (unknown [80.240.191.89]) by smtp.mxes.net (Postfix) with ESMTP id E17CAA3228 for ; Wed, 19 Sep 2007 06:57:04 -0400 (EDT) Message-ID: <46F10091.3000701@apache.org> Date: Wed, 19 Sep 2007 12:57:21 +0200 From: Grzegorz Kossakowski User-Agent: Thunderbird 2.0.0.5 (X11/20070719) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: pipelineComponent scope troubles References: <46C95ED4.7000602@apache.org> <46E4E2CC.1090906@apache.org> <46E4FEC3.4020703@apache.org> <46E52608.7050705@apache.org> <46E5429A.1000808@apache.org> <46E67DA5.9000807@apache.org> <46E6EA9F.5000205@apache.org> <46E7F40D.1030500@apache.org> <46E80467.8090609@apache.org> <46E80EEA.2010803@apache.org> <46E9AED4.5030005@apache.org> <46EA2DEA.8020804@apache.org> <46EA5DF1.6030208@apache.org> <46EA9C9E.5010409@apache.org> <46EAA2F8.1080302@apache.org> <46EAFCCA.8000105@apache.org> <46EFC985.4080401@apache.org> <46EFCFC3.5030407@apache.org> <46EFE734.5020501@apache.org> <46EFF004.8040608@apache.org> <46F00383.4060004@apache.org> <46F01917.3040904@apache.org> <46F024CF.2060508@apache.org> <46F0293A.1090701@apache.org> <46F0EF0D.7070901@apache.org> <46F0F13E.80000@apache.org> <46F0F81C.4060401@apache.org> In-Reply-To: <46F0F81C.4060401@apache.org> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Giacomo Pati pisze: > > > Grzegorz Kossakowski wrote: >> Giacomo Pati pisze: >> Hmmm, it should be called more than three times because when executing >> http://localhost:8080/myBlock1/test the status variable should be put on OM. Is this a case? You can > > No, status is not put on OM! That extremely weird! >> check it by putting breakpoint on org.apache.cocoon.components.flow.FlowHelper.setContextObject(). > > Inteersting that now that I have set additional beakpoint I go more calles to the put method: > > OM ObjId=68 key="java" > OM ObjId=68 key="cocoon" > OM ObjId=68 key="Packages" > OM ObjId=68 key="sitemap" > OM ObjId=68 key="namespace" All these puts are expected and look fine. > But control never reaches FlowHelper.setContextObject() Any idea what could cause it? I have never changed code executing setContextObject() method so I don't think it's me who caused regression. To be honest, I don't think there is any regression at all. Method setContextObject() should be called unconditionally from org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo() and I cannot imagine situation that you call flowscript function, then sendPage() from flowscript and forwardTo is not called. Giacomo, I hope that you can figure out what's going on in your environment because I just lost any clue and I'm starting to think that your problem has nothing to do with OM or pipelineComponent scope at all. >> To give you better idea what we are searching for: I believe that your NPE is caused by the fact >> that flowscript puts status variable on one instance of OM and template from myBlock2 uses another >> instance of OM. > >> You can set breakpoint on org.apache.cocoon.el.impl.jexl.JexlExpression.evaluate() to find out >> against which OM instance the expression is evaluated and what it contains. > > The OM passed to the evaluate method is a Proxy. Don't know where to look at. Found a targetSource > with targetBeanName of "scopedTarget.org.apache.cocoon.el.objectmodel.ObjectModel" Ah, you are right, of course. Proxies has caused problems with debugging for me, too. Quite dumb method to overcome this problem is to just set breakpoint on get() method of ObjectModelImpl and wait for JEXL accessing OM. Then you could figure out which OM instance has been accessed. However, I don't think that spending time on this check makes sense as long as setContextObject() method is not called... HTH. -- Grzegorz Kossakowski Committer and PMC Member of Apache Cocoon http://reflectingonthevicissitudes.wordpress.com/