Bug 40895

Summary: Tomcat breaks XSLT on JRE5 or above
Product: Tomcat 5 Reporter: Kohsuke Kawaguchi <kk>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P2    
Version: 5.0.31   
Target Milestone: ---   
Hardware: Other   
OS: other   

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.