Bug 40895 - Tomcat breaks XSLT on JRE5 or above
Summary: Tomcat breaks XSLT on JRE5 or above
Status: RESOLVED WONTFIX
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.0.31
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-04 07:11 UTC by Kohsuke Kawaguchi
Modified: 2006-11-10 17:35 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kohsuke Kawaguchi 2006-11-04 07:11:54 UTC
Tomcat puts common/endorsed/xml-apis.jar to the endorsed directory. This
xml-api.jar is from Apache. When the application tries to invoke

  javax.xml.transform.TransformerFactory.newInstance()

this xml-apis.jar implementation eventually tries to fall back to the hard-coded
"org.apache.xalan.processor.TransformerFactoryImpl", which simply doesn't exist
anywhere in JRE5.

A few ways to fix this problem.

- Also bundle Xalan in Tomcat.
- Do not put xml-apis.jar and xerces.jar in the endorsed directory. Instead just
put them in the classpath. In this way, Tomcat can find some parser/transformer
in any version of JRE (1.3,1.4,5.0,...)

See http://www.google.com/search?q=Tomcat+TransformerFactoryConfigurationError
for how pervasive this issue is.
Comment 1 Mark Thomas 2006-11-10 17:35:05 UTC
As per
http://forum.java.sun.com/thread.jspa?tstart=30&forumID=34&threadID=542044&trange=15
another solution is to set a system property.

System.setProperty("javax.xml.transform.TransformerFactory",
"com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");

This is not an issue for 5.5.x

5.0.x is no longer actively being worked on. I am therefore resolving this as
WONTFIX since that best reflects the status of this issue.