Re: xalan usage in taglibs
Matthew Broadhead <[email protected]> Thu, 7 Dec 2017 15:08:36 +0100
| Newsgroups | gmane.comp.jakarta.taglibs.user |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]>: >> 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 <[email protected]>: >>>>> On Nov 30, 2017, at 3:14 AM, Matthew Broadhead >>>>> <[email protected]> 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: [email protected] >>> For additional commands, e-mail: [email protected] >>>