Troubleshooting: "TransformerFactoryImpl not found" in System Management Application (Tomcat)
Symptom
When you try to add a node in the System Management Application running on Tomcat 5.5, the following error occurs:
javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found javax.xml.transform.TransformerFactory.newInstance(Unknown Source) com.pega.jmx.connection.util.WriteXML.writeXmlFile(WriteXML.java:286) com.pega.jmx.connection.util.WriteXML.addNode(WriteXML.java:133) com.pega.jmx.connection.managenodes.NodeManager.addNode(NodeManager.java:95) com.pega.jmx.ui.action.ConnectionWizardAction.execute(ConnectionWizardAction.java:246) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Solution
Explanation
This error occurs if the Tomcat “compatibility” package (to allow use of a Java 1.4.x JVM in conjunction with Tomcat 5.5.x) is installed.
The Tomcat compatibility package installs two jar files into the endorsed directory:
xercesImpl.jar
- xml-apis.jar
These Tomcat files supply functionality needed by Tomcat that is not present in JDK 1.4.x (but which is present in Java 5). They override the functionality present in the JDK.
In the file xml-apis.jar, the TransformerFactoryImpl is set to to a class that is present in JDK 1.4.x but is omitted from Java 5: "org.apache.xalan.processor.TransformerFactoryImpl" (hence the error).
Workaround
- Use Java 5 when running Tomcat 5.5
- Remove the Tomcat compatibility files (
xercesImpl.jar
andxml-apis.jar
) from Tomcat’scommon/endorsed
directory.