Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 58802 invoked from network); 2 Jul 2007 11:36:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jul 2007 11:36:05 -0000 Received: (qmail 32174 invoked by uid 500); 2 Jul 2007 11:36:07 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 31859 invoked by uid 500); 2 Jul 2007 11:36:06 -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 31843 invoked by uid 99); 2 Jul 2007 11:36:06 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 04:36:06 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [88.198.46.98] (HELO indoqa.com) (88.198.46.98) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 04:36:01 -0700 Received: from [192.168.1.30] (chello062178239020.5.15.vie.surfer.at [62.178.239.20]) by indoqa.com (Postfix) with ESMTP id A7431254141 for ; Mon, 2 Jul 2007 13:44:25 +0200 (CEST) Message-ID: <4688E306.7090801@apache.org> Date: Mon, 02 Jul 2007 13:35:34 +0200 From: Reinhard Poetz User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: svn commit: r552371 - trunk broken, help needed References: <20070701231346.5A9031A981A@eris.apache.org> <46883A3C.6070708@apache.org> In-Reply-To: <46883A3C.6070708@apache.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Grzegorz Kossakowski wrote: > gkossakowski@apache.org pisze: >> Author: gkossakowski >> Date: Sun Jul 1 16:13:44 2007 >> New Revision: 552371 >> >> URL: http://svn.apache.org/viewvc?view=rev&rev=552371 >> Log: >> COCOON-2082: Getting rid of Avalon dependencies, it includes: >> * conversion JS, JXPath and JEXL compilers to Spring beans >> * conversion DefaultExpressionFactory to Spring bean, it collects >> language compilers by using bean-map from Spring configurator > > As you see, I'm in between of Avalon->Spring conversion process for > expression languages. I have not moved and adjusted tests (thus build > will fail) because I came across very obscure problem. > > First of all I would like you to ask to do svn up and mvn clean install > -Dmaven.test.skip=true for trunk, run cocoon-webapp, access > http://localhost:8888/blocks/cocoon-template-sample/view/caching2 > and check if you get following error: > TypeError: Cannot read property "parameters" from undefined (#1) AFAICS the problem is that we want to support the syntax cocoon.request.parameters.foo to access request parameters. For some reason this isn't supported anymore after your refactorings though I can't see from your commits where this could be caused. (Well actually I don't have an idea where this feature is implemented at all.) > I would be grateful for any reports to be sure if it's not a JDK issue > or so. Also, any help with sorting this out is really appreciated > because I'm really out of ideas how to track such a weird problem. > Details below. > > > After conversion (changes in r552371) ExpressionContext creation is > slightly broken. Take a look at > TemplateObjectModelHelper#getTemplateObjectModel method, the most > interesting fragment is line: > > cocoon.put("settings", > (Settings)WebAppContextUtils.getCurrentWebApplicationContext().getBean(Settings.ROLE)); > > > Cocoon object is normal Java's HashMap, so it seems that there should > happen nothing fancy. As you guess, something weird happens, though ;) > More specifically, this put breaks completely cocoon object. Inspection > in debugger of this object shows that before put operation mentioned > above everything looks ok and just after keys of HashMap are getting out > of sync of values (table). In a fact, the table of values contains 3 > items (and is lacking request object, that explains an exception) and > keySet contains 4 items (including request). Moreover, if I change key > from "settings" to something else like "test", cocoon object is less > broken (table includes request) but if you iterate the cocoon object you > will never reach the request object. From using the debugger I came to the conclustion that the cocoon object is setup correctly (at least for me). I don't see this weird behaviour. -- Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach {Software Engineering, Open Source, Web Applications, Apache Cocoon} web(log): http://www.poetz.cc --------------------------------------------------------------------