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 925DB3E78 for ; Sat, 30 Apr 2011 20:36:09 +0000 (UTC) Received: (qmail 23593 invoked by uid 500); 30 Apr 2011 20:36:08 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 23522 invoked by uid 500); 30 Apr 2011 20:36:08 -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 23514 invoked by uid 99); 30 Apr 2011 20:36:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Apr 2011 20:36:08 +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 (athena.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 20:36:03 +0000 Received: by qwf6 with SMTP id 6so2722439qwf.30 for ; Sat, 30 Apr 2011 13:35:42 -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=4XOnK/PkvmNCLQ01alH33TU9MVKGGFXBuL660tAHFQk=; b=wQiPtErgNUE8NozlGpPTckN9UM/dJxI6YGeLf3BCMlcCaLtLFBfnYTHq+DwvhsINf9 IDyKDDXN+OEQiVJ8lFa2FzyKCqINLV9dfnQYMYOALO3rN/vSF/DRwGX+UREYdG6JrpWk OEgEHEYjTfy/KMwk7iUHNyuB5S0auPjy78uJQ= 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=eoacIWpaRcKkce/JwvsaZKhBE6fUGVcBlTh0GSzW+1Fh5g8eyko/kMe9yQdaGdLXv9 i1slLTj3dMLvOKU/I4uHmuEmoGZp5CAEX1RlSVGQgsJpeABzwvnlZR83y6LWtDf/JN89 e1o9SKyb8cNqgoarfNTMhgxKDlAnDbC1VGBAI= MIME-Version: 1.0 Received: by 10.229.7.3 with SMTP id b3mr4864624qcb.194.1304195741914; Sat, 30 Apr 2011 13:35:41 -0700 (PDT) Received: by 10.229.224.7 with HTTP; Sat, 30 Apr 2011 13:35:41 -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 22:35:41 +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 Hi Paul, please see my answers below. > Can you try: > > > > > > > > > > > > x is ${x} of class ${x.getClass()} and of size ${size(x)} > > > does it also spin 100%? > Yes, it is:/ > Also, could you please try to see the origin a jaxen class? (e.g. org.jax= en.Context ?) Origin of org.jaxen.Context is: bundleresource://106/org/jaxen/Context.clas= s I'm afraid this is not in the form you'd like to see... > What about the version of the jelly xml tag? e.g org.apache.commons.jelly= .tags.xml.SetTag ? SetTag is in commons-jelly-tags-xml-1.1.jar. Is this the version you're interested in? Many thanks, Paul! Csaba 2011/4/30 Paul Libbrecht : > Csaba, > > this sounds real dark... > > Can you try: > > > =C2=A0 > =C2=A0 > =C2=A0 > =C2=A0 > =C2=A0 > > > > > x is ${x} of class ${x.getClass()} and of size ${size(x)} > > > does it also spin 100%? > > Also, could you please try to see the origin a jaxen class? (e.g. org.jax= en.Context ?) > What about the version of the jelly xml tag? e.g org.apache.commons.jelly= .tags.xml.SetTag ? > > thanks in advance > > paul > > > > Le 30 avr. 2011 =C3=A0 20:16, Csaba Gy=C5=91rffy a =C3=A9crit : > >> 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/t= ree/DefaultDocument.class >>> class org.xml.sax.helpers.DefaultHandler loaded from >>> jar:file:/C:/Program%20Files/ibm/WebSphere/AppServer1/java/jre/lib/xml.= jar!/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 intere= st: >>>> >>>> >>>> >>>> =C2=A0 >>>> =C2=A0class ${x.getClass()} loaded from ${x.getClass().getResource('De= faultDocument.class')} >>>> >>>> =C2=A0 >>>> =C2=A0class ${x.getClass()} loaded from ${x.getClass().getResource('De= faultHandler.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 v= ersion of xml-parser was at fault >>>>>> trying to determine the implemented xml-parser and the version in th= is 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 vol= t, 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 cs= ak ismeret cser=C3=A9t szolg=C3=A1l =C3=A9s >>>>>> semmif=C3=A9le jogi alkalmazhat=C3=B3s=C3=A1ga sincs. =C2=A0Mivel az= electronikus =C3=BCzenetek >>>>>> k=C3=B6nnyen megv=C3=A1ltoztathat=C3=B3ak, ez=C3=A9rt minket semmi f= elel=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 E= JB >>>>>>>> container (session bean), running the script above hangs, and 100%= CPU >>>>>>>> utilisation comes. I realized while debugging that NodeComparator >>>>>>>> class' getDepth method gets into an infinite loop and never return= s. >>>>>>>> >>>>>>>> If I remove two "b" elements from the xml fragment above (so only = one >>>>>>>> remains), it works fine. It also works if I change the second part= of >>>>>>>> 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 = appreciated. >>>>>>>> >>>>>>>> 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 >> > > > --------------------------------------------------------------------- > 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