I have a Tomcat 5.5 web application that uses the Apache Commons-Configuration library to create an XML configuration file at runtime. Commons-Configuration, in turn, uses the javax.xml.transformJAXP API to accomplish this.
Starting with the upgrade to Java 7, the operation ends with an error message:
Caused by: javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
In past releases, I never added xalan.jar; instead, I relied on the default XSLT implementation of the platform.
Some things I checked:
- There are no entries in any of the application JAR files, library banks, or Tomcat banks
META-INF/services/javax.xml.transform.TransformerFactory
System property javax.xml.transform.TransformerFactorynot set (checked at runtime via JVisualVM) No file jaxp.propertiesin directoryjre/libRunning with -Djaxp.debug=1leads to the following output:
JAXP: find factoryId =javax.xml.transform.TransformerFactory
JAXP: loaded from fallback value: org.apache.xalan.processor.TransformerFactoryImpl
Where does this reserve cost come from? Oracle sends the Xalan transformer, but since 1.7 repacked it as com.sun.org.apache.xalan.processor.... Shouldn't that be a fallback value?
source
share