Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 03DE1200D4B for ; Mon, 27 Nov 2017 20:04:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 02422160C14; Mon, 27 Nov 2017 19:04:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 215E8160BFA for ; Mon, 27 Nov 2017 20:04:02 +0100 (CET) Received: (qmail 7650 invoked by uid 500); 27 Nov 2017 19:04:02 -0000 Mailing-List: contact taglibs-user-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tag Libraries Users List" Delivered-To: mailing list taglibs-user@tomcat.apache.org Received: (qmail 7638 invoked by uid 99); 27 Nov 2017 19:04:01 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Nov 2017 19:04:01 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 1BA021A0CFA for ; Mon, 27 Nov 2017 19:04:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id IucJ3tGg8I1g for ; Mon, 27 Nov 2017 19:03:59 +0000 (UTC) Received: from mail-yb0-f172.google.com (mail-yb0-f172.google.com [209.85.213.172]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 9D61C5F177 for ; Mon, 27 Nov 2017 19:03:59 +0000 (UTC) Received: by mail-yb0-f172.google.com with SMTP id g2so7452957ybb.7 for ; Mon, 27 Nov 2017 11:03:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=KzEt8IpVRd/dTSf5mP8CL2HikzgvS+L1hGETZ8RouoI=; b=oU8df8wcli4dRQfD6ClMo0IobEydArf1ZqEy4EnxvsMcg5GD3VG52XAKxbiwOh8pzg 4WhWu9kziR5P61EVZ4SD8aMpb2xg4flXehGQC+yJJIh3oYARUK0OpCNB4qvv8wQYttR5 P0BBKAm97GTBXojhspY0pg/8RunfNqUwmmCjEFueKGZflOeFmGWQ55tjraKPMriUelLV kLjsHoRlQYiZ9GzmiGFR61JzJ5oXYrNTMKbe7XWjOU9eDTsjbJYUAMrURaL9q4veW+AJ 1N6VypzOB12Og5FZtrvdalpngDBTg/cBrUlHk93JyCp2xybsxKCi/QvIMbo4rssynZrW YBqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=KzEt8IpVRd/dTSf5mP8CL2HikzgvS+L1hGETZ8RouoI=; b=UUVuclbzmlLnw8RmPEFZF6KvE7L4zujnctr7voSePfe8cSWhS5vjh52MO3tAbQax+0 7A6pBzGmMDllXhkP3m+u1p+cOiS5+u7XiOda/U9awW5y/aXrGL7l1wxhz78KLUrky/0c pHM/avmNYE5leOxZL2TA9JEw1FopthrRxNJEOs7S/VTOFLWbCWJcZiGGK1llASB7XNYe M/uLSPRsi/TKKTVtPwcy29dhgUeUkWyqUfuh/vDEE+tLT/bzwAt9E+qweOKKKWXftkMH IFJd5Rbeh2MIfOWUBEKsYGYjbTmb4HC326R3SQDhmlFcgXgnc8XvOwDScrEsmClmLYgc IzNA== X-Gm-Message-State: AJaThX7A1g+/p7GsO0sTVcWWDh791DOkaSARLvCgEdKtiAsgkIlDBVDi pYz4yWwxgIO9lTeuIElWp/A46/Qau27udTTatys= X-Google-Smtp-Source: AGs4zMYT3eJPdUMpiRpf9eEg8/Cl2GDTHp9ZsUDdzLSIsU+4QKadM3uJUgDcMt+u3+y0Y/QiuUXR99lTk5UM594n+p4= X-Received: by 10.37.105.142 with SMTP id e136mr24406053ybc.118.1511809432759; Mon, 27 Nov 2017 11:03:52 -0800 (PST) MIME-Version: 1.0 Sender: rmannibucau@gmail.com Received: by 10.37.5.203 with HTTP; Mon, 27 Nov 2017 11:03:32 -0800 (PST) In-Reply-To: <978AFC4F-7B5E-47A4-8DE8-D9834E6F1DA7@apache.org> References: <66442bd7-e0db-31ec-00d3-76dd2f660b48@nbmlaw.co.uk> <0874B620-1354-45D8-8468-3C73BE493FA5@apache.org> <786191b4-42ec-2aee-1632-8444d831c4ab@nbmlaw.co.uk> <6BE4CAF3-41A1-4725-8D80-AAD26BA9C554@boynes.com> <493466c1-8c4b-fe60-2efd-e9c9e3c9ceb9@nbmlaw.co.uk> <3CADD70C-C371-48E0-81C9-0EEE7E9A0D9E@apache.org> <978AFC4F-7B5E-47A4-8DE8-D9834E6F1DA7@apache.org> From: Romain Manni-Bucau Date: Mon, 27 Nov 2017 20:03:32 +0100 X-Google-Sender-Auth: mk1v9EhpSmg3YzRGBDiF3915yJ4 Message-ID: Subject: Re: xalan usage in taglibs To: Jeremy Boynes Cc: Tag Libraries Users List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable archived-at: Mon, 27 Nov 2017 19:04:04 -0000 2017-11-27 20:01 GMT+01:00 Jeremy Boynes : >> On Nov 27, 2017, at 7:38 AM, Romain Manni-Bucau = wrote: >> >> 2017-11-27 16:31 GMT+01:00 Jeremy Boynes : >>> On Nov 27, 2017, at 12:07 AM, Matthew Broadhead >>> wrote: >>> >>> In TomEE 7.0.3 everything is fine at startup. But if a webapp is reloa= ded I >>> get >>> java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault >>> cannot be cast to org.apache.xml.dtm.DTMManager >>> and the whole container needs to be restarted which is not ideal during >>> production >>> >>> Now in TomEE 7.0.4 I cannot even start without this error so I cannot >>> upgrade. >>> >>> It seems like a classloader issue but taglibs is the only hardcoded >>> dependency on xalan >>> >>> >>> Are you including the taglibs jars in your war when deploying to TomEE?= You >>> shouldn=E2=80=99t need to do that as TomEE should be providing its own >>> implementation of JSTL which would mean there is a chance of conflict i= f you >>> also include them. >> >> Issue is xalan conflicts very easily in terms of transitive deps. >> >>> >>> From a thread on tomee-users, it sounds like TomEE could be trying incl= ude >>> taglibs and avoid including the Xalan dependency but I wouldn=E2=80=99t= expect that >>> to work as it actually is needed by the XML tags. The dependency is >>> =E2=80=9Cprovided=E2=80=9D scope to avoid automatic transitive inclusio= n for applications >>> that don=E2=80=99t use the XML tags (which is most). For container inte= gration it >>> should be included as an application might use those tags. >> >> TomEE bundles taglib and therefore must bundle xalan otherwise several >> features don't work and TCK don't pass. > > That was one of the tradeoffs in fixing #27717. I tried to use pure JAXP = and the implementation from the JRE but it had the same issue as the way 1.= 1 worked, perhaps not surprisingly given they are both Xalan based. To avoi= d rebuilding the DTM for each XPath execution, the tags work the same way a= n XSLT does, creating the DTM once and then evaluating the expression using= the DTM. Unfortunately that meant using the low-level Xalan DTM APIs hence= the direct dependency. The trade off doing this was: > > a) do nothing, leaving #27717 unresolved > b) use Xalan as a dependency that was only actually needed if the XML tag= s were used in an application > c) shade Xalan and increase the library size when most users wouldn=E2=80= =99t need it > d) refactor the XML tags into a separate taglib from the others so users = would need to include multiple libraries > > Option b) seemed like a reasonable compromise because: > - users on a Servlet-profile container would not have JSTL provided by th= e container and so would control which dependencies they needed > - users on a Web- or Full-profile container would have the entire JSTL im= plementation provided by the container and the container vendor would have = ensured the dependencies were resolved appropriately This is where it doesn't work. In tomcat you impose it to be inherited in the app and therefore conflict 80% of the time :(. I'd be for option e): support xalan as an optional dependency if present or fallback on a) if not. > > --------------------------------------------------------------------- To unsubscribe, e-mail: taglibs-user-unsubscribe@tomcat.apache.org For additional commands, e-mail: taglibs-user-help@tomcat.apache.org