You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Daniel Sun <Da...@citect.com> on 2005/05/16 09:29:35 UTC

Tomcat using endorsed xalan stuff conflicts with java 1.5's renamed xalan impl

Hi all,
I hit the following exception in my servelet.
"javax.xml.transform.TransformerFactoryConfigurationError: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found"

After googling, I believe the cause of it is that the endorsed
xml-apis.jar somehow sets the system property
"javax.xml.transform.TransformerFactory" to
"org.apache.xalan.processor.TransformerFactoryImpl", but the JAVA 1.5
has renamed the whole package to "com.sun.org.apache.*". If the
xalan.jar is not available in the "endorsed" folder, hence the
exception.

I can solve this issue in my case by doing either of the following two:
1. System.setProperty("javax.xml.transform.TransformerFactory",
"com.sun.org.apache.xalan.internal.xsltc.traxTransformerFactoryImpl").
But if on a Tomcat server, another web app needs some functionality only
available in non-sun implementation (eg. Xalan). Will my setting break
their setting? I mean is the setProperty affecting other web apps
running in tomcat?
 
2. Disable Tomcat using endorsed folder, which I guess it will result
using the default sun implementation. Then I want ask why Tomcat still
uses this endorsed folder (by setting -D on JAVA invoke), it works fine
without them (I have even seen some workarounds suggested on the net
that just renaming the endorsed to endorsed.useless :)

I understand there is the 3rd option, which is to download the full
xalan.jar and put it in the endorsed folder, but I just don't want to
ask end user to do this. You know we need to keep the end users hand
clean as much as possible.

Thanks in advance for clearing this up for me.

Regards,
Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org