tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Broadhead <matthew.broadh...@nbmlaw.co.uk>
Subject Re: xalan usage in taglibs
Date Fri, 08 Dec 2017 11:58:22 GMT
here is a patch which removes the xalan dependency.  but it breaks the 
ForEachTagTest.
i notice that every constructor generates a JSTLXPathCompiler. could it 
not be a singleton?

On 07/12/2017 15:08, Matthew Broadhead wrote:
> is there any other way to rewrite it so that it doesn't use 
> DTMManager?  that would also keep the speed?  is it a matter of 
> keeping the object in memory so that it doesn't have to keep building 
> fragments?
> also could i build the old version that doesn't need DTMManager and 
> drop it in my system to see what effect it has?
>
> On 06/12/2017 14:30, Romain Manni-Bucau wrote:
>> requires a classloader hack, no other trivial way, and that's why we
>> removed it from tomee
>>
>> 2017-12-06 14:27 GMT+01:00 Matthew Broadhead 
>> <matthew.broadhead@nbmlaw.co.uk>:
>>> is there any way that i can get the correct xalan at runtime?
>>>
>>> to recap this is the code that is blowing up for me:
>>> Reader xsl = new InputStreamReader(filepath.openStream());
>>> TransformerFactory transformerfactory = 
>>> TransformerFactory.newInstance();
>>> StreamSource ssXsl = new StreamSource(xsl);
>>> ssXsl.setSystemId(filepath.toExternalForm());
>>> Templates templates = transformerfactory.newTemplates(ssXsl);
>>> Transformer transformer = templates.newTransformer();
>>>
>>> last line causes:
>>> java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault
>>> cannot be cast to org.apache.xml.dtm.DTMManager
>>>      at org.apache.xml.dtm.DTMManager.newInstance(DTMManager.java:137)
>>>      at org.apache.xpath.XPathContext.<init>(XPathContext.java:102)
>>>      at org.apache.xpath.XPathContext.<init>(XPathContext.java:349)
>>>      at org.apache.xpath.XPathContext.<init>(XPathContext.java:337)
>>>      at
>>> org.apache.xalan.transformer.TransformerImpl.<init>(TransformerImpl.java:397)

>>>
>>>      at
>>> org.apache.xalan.templates.StylesheetRoot.newTransformer(StylesheetRoot.java:200)

>>>
>>>
>>> maybe you know some way to find the Impl with the correct DTMManager?
>>>
>>>
>>> On 30/11/2017 17:30, Romain Manni-Bucau wrote:
>>>> 2017-11-30 16:51 GMT+01:00 Jeremy Boynes <jeremy@boynes.com>:
>>>>>> On Nov 30, 2017, at 3:14 AM, Matthew Broadhead
>>>>>> <matthew.broadhead@nbmlaw.co.uk> wrote:
>>>>>>
>>>>>> has anything been decided?  if i try to redeploy a context in 
>>>>>> production
>>>>>> all my xslt processors blow up.  there should be a solution that

>>>>>> fits all?
>>>>> Taglibs (both Apache and Glassfish) has always had a dependency on 
>>>>> Xalan.
>>>>> My understanding is that TomEE did not include it and so broke 
>>>>> users that
>>>>> use the XML tags. If so, TomEE should fix that.
>>>> Sadly this is not a bug on tomee but the best solution we went through
>>>> after having delivered xalan for some releases. Xalan dependency
>>>> breaks 80% of apps so no way to include it - and this is the issue of
>>>> Matthew. Note it also affects simple apps in tomcat including taglib
>>>> and other libs.
>>>>
>>>>> You can probably add Xalan to your TomEE installation somehow to work
>>>>> around it but how to do that is really a question for the TomEE 
>>>>> users list.
>>>>>
>>>>> A patch for Taglibs that removes the Xalan dependency and doesn't 
>>>>> regress
>>>>> the #27717 performance fix would be great. A patch that removed the
>>>>> dependency but regressed performance would have to be evaluated at 
>>>>> the time.
>>>>> The previous decision was not to do that.
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: taglibs-user-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: taglibs-user-help@tomcat.apache.org
>>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: taglibs-user-help@tomcat.apache.org
>


Mime
View raw message