Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3EBE23D6A for ; Sat, 30 Apr 2011 18:16:36 +0000 (UTC) Received: (qmail 48673 invoked by uid 500); 30 Apr 2011 18:16:35 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 48593 invoked by uid 500); 30 Apr 2011 18:16:35 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 48585 invoked by uid 99); 30 Apr 2011 18:16:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Apr 2011 18:16:35 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of csabeee@gmail.com designates 209.85.216.43 as permitted sender) Received: from [209.85.216.43] (HELO mail-qw0-f43.google.com) (209.85.216.43) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Apr 2011 18:16:28 +0000 Received: by qwf6 with SMTP id 6so2694277qwf.30 for ; Sat, 30 Apr 2011 11:16:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=yb5G6fm3moCX/BXi0i0pYe80oj+GH0+2wSbrYf93mNc=; b=hhjmobrV1tSymBOMuitnZDYyuAC2I3q+26BJbSiBCPk79yaTTJguhGB75AicY0e741 cOT6N4EyqyFlU0SHoaajkzHDbqyI76cN0YwPUJz7cATW1YQZ28PwALXvet0HD1iEQ7a5 H1+X1ivuVmviem9lbYUJSF64XBsSrTMnPHEWU= 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=KaQNXSxmvy3COZ8DpBnHAw4UFvdY47Hd10IhsrCORDnvnM43E9rOjUOcG8/xsN9v91 EYYNDCsmaIE/NAVSqKBOAjCccMXxDTKB9/RdQbYC5N/GxfgI3HBEuQJBuM7ZfhbE8/VC kA7tr50n3Ytn9A5PS/aFf1jpRJXKPr/rM+Xw8= MIME-Version: 1.0 Received: by 10.229.63.74 with SMTP id a10mr4791645qci.232.1304187367232; Sat, 30 Apr 2011 11:16:07 -0700 (PDT) Received: by 10.229.224.7 with HTTP; Sat, 30 Apr 2011 11:16:07 -0700 (PDT) In-Reply-To: References: <740B50E4-F215-4E2E-A862-98B1B9C5AE4F@hoplahup.net> <0DBB4D14-A3E5-48F0-8EDD-AE78E0E4EF93@hoplahup.net> Date: Sat, 30 Apr 2011 20:16:07 +0200 Message-ID: Subject: Re: [Jelly] XML ForEach tag hangs From: =?UTF-8?Q?Csaba_Gy=C5=91rffy?= To: Commons Users List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org If I'm running Paul's script from a standard Java app, DefaultHandler gets loaded from an xml.jar different than the one I mentioned earlier. So, I tried to replace WebSphere's version with the "good" version of xml.jar, but the result is the same: processing of a script with foreach tag hangs, 100% CPU utilization. Origin of DefaultDocument class is the same, no matter if using app server or not. Do you have any idea why it's not working inside the app server? Thanks. Csaba 2011/4/30 Csaba Gy=C5=91rffy : > DefaultDocument comes from a Jelly library, while DefaultHandler is > from a WebSphere jar: > > class org.dom4j.tree.DefaultDocument loaded from > wsjar:file:/C:/Documents and > Settings/usr/Desktop/commons-jelly-1.0/lib/dom4j-1.5.2.jar!/org/dom4j/tre= e/DefaultDocument.class > class org.xml.sax.helpers.DefaultHandler loaded from > jar:file:/C:/Program%20Files/ibm/WebSphere/AppServer1/java/jre/lib/xml.ja= r!/org/xml/sax/helpers/DefaultHandler.class > > 2011/4/30 Paul Libbrecht : >> Here's a little script that will tell you the URL of classes of interest= : >> >> >> >> =C2=A0 >> =C2=A0class ${x.getClass()} loaded from ${x.getClass().getResource('Defa= ultDocument.class')} >> >> =C2=A0 >> =C2=A0class ${x.getClass()} loaded from ${x.getClass().getResource('Defa= ultHandler.class')} >> >> >> >> With some chances, your URLs are of the form file:///xxxxx.jar!a/b/c/d/e= .class >> If you have a special protocol-handler, it may be harder. >> >> paul >> >> >> Le 30 avr. 2011 =C3=A0 15:40, Csaba Gy=C5=91rffy a =C3=A9crit : >> >>> Hi, >>> >>> thank you very much for your responses. I'm already trying to >>> determine the version of xml parser without much success yet. >>> >>> Csaba >>> >>> 2011/4/30 Martin Gainty : >>>> >>>> trying not to point fingers (at least until we have ALL the facts) >>>> a similar incident happened on another apache project and an older ver= sion of xml-parser was at fault >>>> trying to determine the implemented xml-parser and the version in this= case would *at least* isolate the problem to that parser >>>> >>>> thanks paul! >>>> Martin >>>> ______________________________________________ >>>> Jogi =C3=A9s Bizalmass=C3=A1gi kinyilatkoztat=C3=A1s >>>> =C2=A0Ez az >>>> =C3=BCzenet bizalmas. =C2=A0Ha nem =C3=B6n az akinek sz=C3=A1nva volt,= akkor k=C3=A9rj=C3=BCk, hogy >>>> jelentse azt nek=C3=BCnk vissza. Semmif=C3=A9le tov=C3=A1bb=C3=ADt=C3= =A1sa vagy m=C3=A1solat=C3=A1nak >>>> k=C3=A9sz=C3=ADt=C3=A9se nem megengedett. =C2=A0Ez az =C3=BCzenet csak= ismeret cser=C3=A9t szolg=C3=A1l =C3=A9s >>>> semmif=C3=A9le jogi alkalmazhat=C3=B3s=C3=A1ga sincs. =C2=A0Mivel az e= lectronikus =C3=BCzenetek >>>> k=C3=B6nnyen megv=C3=A1ltoztathat=C3=B3ak, ez=C3=A9rt minket semmi fel= el=C3=B6s=C3=A9g nem terhelhet >>>> ezen =C3=BCzenet tartalma miatt. >>>> >>>> >>>> >>>> >>>> >>>>> Subject: Re: [Jelly] XML ForEach tag hangs >>>>> From: paul@hoplahup.net >>>>> Date: Sat, 30 Apr 2011 09:44:27 +0200 >>>>> To: user@commons.apache.org >>>>> >>>>> Csaba, >>>>> >>>>> As Martin has suggested, the underlying XML parser could be guilty. >>>>> I would rather suspect an overly old dom4j or jaxen (that would be in= the container's classpath hence overriding the webapp's). >>>>> >>>>> Are you able to find their version? >>>>> Otherwise I can dig out a form of jwhich in jelly. >>>>> >>>>> paul >>>>> >>>>> >>>>> Le 30 avr. 2011 =C3=A0 03:02, Csaba Gy=C5=91rffy a =C3=A9crit : >>>>> >>>>>> Hello there! >>>>>> >>>>>> I'm trying to use the ForEach tag in Jelly's XML tag library. The >>>>>> following script works fine in a standard Java console application: >>>>>> >>>>>> >>>>>> =C2=A0 >>>>>> =C2=A0 =C2=A0 >>>>>> =C2=A0 =C2=A0 >>>>>> =C2=A0 =C2=A0 >>>>>> =C2=A0 >>>>>> >>>>>> >>>>>> >>>>>> =C2=A0... >>>>>> >>>>>> >>>>>> However, if using Jelly on an application server, from inside an EJB >>>>>> container (session bean), running the script above hangs, and 100% C= PU >>>>>> utilisation comes. I realized while debugging that NodeComparator >>>>>> class' getDepth method gets into an infinite loop and never returns. >>>>>> >>>>>> If I remove two "b" elements from the xml fragment above (so only on= e >>>>>> remains), it works fine. It also works if I change the second part o= f >>>>>> the above script to the following: >>>>>> >>>>>> >>>>>> =C2=A0 >>>>>> =C2=A0 =C2=A0... >>>>>> =C2=A0 >>>>>> >>>>>> >>>>>> Does anyone have any idea why is that happening? Any help is much ap= preciated. >>>>>> >>>>>> Thank you: >>>>>> Csaba >>>>>> >>>>>> --------------------------------------------------------------------= - >>>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >>>>>> For additional commands, e-mail: user-help@commons.apache.org >>>>>> >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >>>>> For additional commands, e-mail: user-help@commons.apache.org >>>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >>> For additional commands, e-mail: user-help@commons.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >> For additional commands, e-mail: user-help@commons.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org