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 68C48200D4B for ; Mon, 27 Nov 2017 09:07:30 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 674E2160C13; Mon, 27 Nov 2017 08:07:30 +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 ADAE2160C02 for ; Mon, 27 Nov 2017 09:07:29 +0100 (CET) Received: (qmail 55568 invoked by uid 500); 27 Nov 2017 08:07:28 -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 55557 invoked by uid 99); 27 Nov 2017 08:07:28 -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 08:07:28 +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 8C3E31A11DA for ; Mon, 27 Nov 2017 08:07:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.098 X-Spam-Level: * X-Spam-Status: No, score=1.098 tagged_above=-999 required=6.31 tests=[KAM_COUK=1.1, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled 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 wm-Zcl9NocmG for ; Mon, 27 Nov 2017 08:07:23 +0000 (UTC) Received: from ns1.nbmlaw.co.uk (ns1.nbmlaw.co.uk [217.174.253.19]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 722E45F177 for ; Mon, 27 Nov 2017 08:07:23 +0000 (UTC) Received: from Mac-mini-2.local (124.red-83-55-185.dynamicip.rima-tde.net [83.55.185.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by ns1.nbmlaw.co.uk (Postfix) with ESMTPSA id 4AEC12C3817 for ; Mon, 27 Nov 2017 08:07:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 ns1.nbmlaw.co.uk 4AEC12C3817 Authentication-Results: ns1.nbmlaw.co.uk; dmarc=fail (p=quarantine dis=none) header.from=nbmlaw.co.uk Authentication-Results: ns1.nbmlaw.co.uk; spf=fail smtp.mailfrom=matthew.broadhead@nbmlaw.co.uk Subject: Re: xalan usage in taglibs To: taglibs-user@tomcat.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> From: Matthew Broadhead Message-ID: <493466c1-8c4b-fe60-2efd-e9c9e3c9ceb9@nbmlaw.co.uk> Date: Mon, 27 Nov 2017 09:07:15 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <6BE4CAF3-41A1-4725-8D80-AAD26BA9C554@boynes.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US archived-at: Mon, 27 Nov 2017 08:07:30 -0000 In TomEE 7.0.3 everything is fine at startup.  But if a webapp is reloaded 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 On 27/11/2017 01:12, Jeremy Boynes wrote: >> On Nov 26, 2017, at 2:17 PM, Matthew Broadhead wrote: >> >> So to run the tests I could reverse the changes of the commit and then update to javax.xml.* and run tests? >> >> I am still struggling a bit to understand exactly what is happening wrt VariableStack and how I can change over to XPathVariableResolver. And also don't see a way to replace XBoolean, XNumber, XString etc... >> >> I will keep trying things. Can I come back to you with specific queries? > I did experiment with a pure JAXP based solution - there’s a patch attached to #27717 that might be a place to start from. You may need to roll back a bit to get it to apply. > > From what I remember, the performance problem stemmed from the evaluation of XPath inside the loop, with both Xalan and JAXP (which used a shaded version of Xalan) reinitializing the DTM each time leading to N * N scaling. The fix was to use Xalan’s API directly to convert the document’s DOM to a DTM once and then apply the XPath against the DTM each time leading to 1 * N scaling. > > The downside is that there was a direct dependency on Xalan 2.7.1. I think we tried using 2.7.2 but there was some other problem with that I can’t find at the moment. Given the stability of Xalan/Xerces, what’s causing the conflict with FOP? --------------------------------------------------------------------- To unsubscribe, e-mail: taglibs-user-unsubscribe@tomcat.apache.org For additional commands, e-mail: taglibs-user-help@tomcat.apache.org