Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 87088 invoked by uid 500); 7 Mar 2002 08:08:16 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 87077 invoked from network); 7 Mar 2002 08:08:15 -0000 Date: Thu, 7 Mar 2002 09:08:22 +0100 From: Christian Joelly To: Cocoon ML Subject: [C2.0.1] esql:group/eqsl:member Message-ID: <20020307080821.GA3440@knapp.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5I6of5zJg18YgZEa" Content-Disposition: inline User-Agent: Mutt/1.3.27i Sender: Christian Joelly X-Virus-Scanned: by AMaViS-perl11-milter (http://amavis.org/) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --5I6of5zJg18YgZEa Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Content-Disposition: inline --DocE+STaALJfprDB Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! i have a *strange* problem with esql:group/esql:member: when i add esql:group/esql:member to my xsp page then the loop fetching the results from the resultset changes to an endless loop, till i get an java.lang.OutOfMemoryError. settings vm: -ms128m -mx256m settings: storejanitor: freememory=3D10000000 heapsize=3D268435456 the logic of this page is: (simplified) page // main query esql-connection #1 esql-pool esql-query #1 esql-results #1 =09 // nested query esql-connection #2 esql-pool esql-query #2 esql-results #2 // one more query for lookup data esql-connection #3 esql-pool esql-query #3 esql-results #3 /esql-connection #3 // add results to xml tree output esql-result #2 // xsp-logic if display-details then // esql-query with group/member esql-connection #4 esql-pool esql-query #4 esql-results #4 esql-group =09 esql-member // add row to xml tree esql-result #4 /esql-member // add summary row to xml tree summary-line /esql-group /esql-connection #5 /if /esql-connection #2 /esql-connection #1 /page if i use esql:group/esql:member with an simpler query, all works as expected. and if i remove the esql:group, esql:member and summary line from the xsp page shown above thers also no problem... thx for any hint, chris btw: i have attached the xsp page for reference :o) --=20 KNAPP Logistics Automation http://www.knapp.com Ing. Christian J=F6lly Tel/FAX: (++43) 316 / 495 1926 / 495 394 G=FCnter-Knapp-Stra=DFe 5-7 A-8075 Hart bei Graz --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="zeitenprodukt.xsp" Content-Transfer-Encoding: quoted-printable =20 String produkt =3D ""; if (= !=3D null) { produkt =3D ; } String auftrag =3D ""; if (= !=3D null) { auftrag =3D ; } String kanr =3D ""; if ( !=3D = null) { kanr =3D ; } String report =3D ""; if ( != =3D null) { report =3D ; } String sLi =3D ""; if ( !=3D nul= l) { sLi =3D ; } String sLit =3D ""; if ( !=3D n= ull) { sLit =3D ; } String sLitPos =3D ""; if ( = !=3D null) { sLitPos =3D ; } int nKaNr; String sProdukt; float nMenge =3D 0; float nSollzeit =3D 0; float nSollzeitStk =3D 0; float nIstzeit =3D 0; float nIstzeitSchnitt =3D 0; float nSumMenge =3D 0; float nSumIstzeit =3D 0; float nSumSollzeit =3D 0; float nSumIstzeitSchnitt =3D 0; =09 float nSumIstzeitKstGr =3D 0; float nSumSollzeitKstGr =3D 0; float nSumIstzeitSchnittKstGr =3D 0; float nSumSollzeitStkKstGr =3D 0; String sQuery =3D ""; String sQueryInner =3D ""; =20 Auftrag: auftrag sLisLitsLitPos Produkt: produkt if ((kanr !=3D null) && (kanr.length() > 0)) { KANR: kanr } Soll/Ist Zeiten if (report.equals("istzeit-kst")) { nach Kostenstellen } if (report.equals("istzeit-kst")) { (Kst Gr.) } Li if (report.equals("istzeit-kst")) { (Kst) } Menge Sollzeit (Stk. [h]) Sollzeit (Gesamt [h]) Istzeit BDE (Gesamt [h]) Istzeit BDE (Schnitt [h= ]) =09 =20 pps sQuery =3D " SELECT SUM(ap.menge) as menge, ap.li, ap.lit, ap.litpos FROM aufpos=3Dap"; =09 if ((kanr !=3D null) && (kanr.length() > 0)) { sQuery +=3D ", stbk_kopf=3Dsk "; } =09 sQuery +=3D " WHERE ap.auf =3D \"" + auftrag + "\" AND CONCAT(ap.produkt, ap.idx) =3D \"" + produkt + "\" "; =09 if ((kanr !=3D null) && (kanr.length() > 0)) { sQuery +=3D " AND sk.auf =3D ap.auf AND sk.bau =3D ap.bau AND sk.pos =3D ap.pos AND sk.tei =3D ap.tei AND sk.kanr =3D \"" + kanr + "\" "; } if ((sLi !=3D null) && (sLi.length() > 0)) { sQuery +=3D " AND ap.li =3D \"" + sLi + "\" "; } if ((sLit !=3D null) && (sLit.length() > 0)) { sQuery +=3D " AND ap.lit =3D \"" + sLit + "\" "; } if ((sLitPos !=3D null) && (sLitPos.length() > 0)) { sQuery +=3D " AND ap.litpos =3D \"" + sLitPos + "\" "; } =09 sQuery +=3D " GROUP BY ap.li, ap.lit, ap.litpos "; sQuery nMenge =3D ; nSumMenge +=3D nMenge; sLi =3D ; sLit =3D ; sLitPos =3D ; pps sQueryInner =3D " SELECT sum(s.irzt+s.iezt) as istzeit FROM aufpos=3Da LEFT OUTER JOIN stbk_kopf=3Dsk ON ( sk.auf =3D a.auf AND sk.bau =3D a.bau AND sk.pos =3D a.pos AND sk.tei =3D a.tei ) LEFT OUTER JOIN stbk=3Ds ON ( s.stbk =3D sk.stbk AND s.stbkindex =3D sk.stbkindex ) WHERE a.auf =3D \"" + auftrag + "\" AND CONCAT(a.produkt, a.idx) =3D \"" + produkt + "\" AND a.li =3D \"" + sLi + "\" AND a.lit =3D \"" + sLit + "\" AND a.litpos =3D \"" + sLitPos + "\" "; if ((kanr !=3D null) && (kanr.length() > 0)) { sQueryInner +=3D " AND sk.kanr =3D \"" + kanr + "\" "; } sQueryInner nIstzeit =3D ; nSumIstzeit +=3D nIstzeit; if (nMenge > 0) { nIstzeitSchnitt =3D nIstzeit / nMenge; } else { nIstzeitSchnitt =3D 0; } pps SELECT sum(szeit) AS sollzeitkst FROM sollzeiten_kst WHERE produkt =3D prod= ukt.substring(0,8) nSollzeitStk =3D ; nSumSollzeit +=3D nSollzeitStk * nMenge; nMenge nSollzeitStk nSollzeitStk * nMenge nIstzeit = nIstzeitSchnitt if (report.equals("istzeit-kst")) { pps SELECT s.ikst, s.kstgr, sum(s.irzt+s.iezt) as istzeit, skst.szeit as sollzeitstk FROM aufpos=3Da LEFT OUTER JOIN stbk_kopf=3Dsk ON ( sk.auf =3D a.auf AND sk.bau =3D a.bau AND sk.pos =3D a.pos AND sk.tei =3D a.tei ) LEFT OUTER JOIN stbk=3Ds ON ( s.stbk =3D sk.stbk AND s.stbkindex =3D sk.stbkindex ) LEFT OUTER JOIN sollzeiten_kst=3Dskst ON ( skst.kst =3D s.skst AND skst.produkt =3D a.produkt ) WHERE a.auf =3D auft= rag AND CONCAT(a.produkt, a.idx) =3D produkt AND a.li =3D AND a.lit =3D AND a.litpos =3D AND length(s.ikst) > 0 GROUP BY s.ikst =09 nSumSollzeitStkKstGr =3D 0; nSumSollzeitKstGr =3D 0; nSumIstzeitKstGr =3D 0; nSumIstzeitSchnittKstGr =3D 0; nSollzeitStk =3D ; nSumSollzeitStkKstGr +=3D nSollzeitStk; nSumSollzeitKstGr +=3D nSollzeitStk * nMenge; =09 nIstzeit =3D ; if (nMenge > 0) { nIstzeitSchnitt =3D nIstzeit / nMenge; } else { nIstzeitSchnitt =3D 0; } nSumIstzeitKstGr +=3D nIstzeit; nSumIstzeitSchnittKstGr +=3D nIstzeitSchnitt; <= esql:get-string column=3D"kstgr"/> nSollzeitStk nSollzeitStk * nMenge nIstzeit nIstzeitSchnitt =09 Su= mme nSumSollzeitStkKstGr nSumSollzeitKstGr = nSumIstzeitKstGr nSumIstzeitSchnittKstGr =09 } =09 =20 =20 =09 if (nSumMenge > 0) { nSumIstzeitSchnitt =3D nSumIstzeit / nSumMenge; } else { nSumIstzeitSchnitt =3D 0; } Summe nSumMe= nge = 0 nSu= mSollzeit nSum= Istzeit nSumIstzeitSchnitt --DocE+STaALJfprDB-- --5I6of5zJg18YgZEa Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Weitere Infos: siehe http://www.gnupg.org iD8DBQE8hx/1H9oxN0KOR1IRAi8aAJ9eRxlU1VwXbC3Lu6D7jC5C/ODaWwCfYeEY pA3y6+6rxGkoS5UuS7YF/fY= =V5rC -----END PGP SIGNATURE----- --5I6of5zJg18YgZEa--