views:

38

answers:

1

I've implented a simple webapp that transforms XML based on an XSTL stylesheet. It works fine on all the Windows servers I've deployed it on (to Tomcat), but on all Linux systems, I get a compile error on the XSLT.

As best I can tell, it's because Java 1.6 isn't using the same processor behind javax.xml.transform. On the one Linux system, it's org.apache.xalan.xslt, version 2.4.

What I can't figure out is how to generically figure out what any given system is using behind javax.xml.transform.

Or, if anyone has any hints on what else I might do to figure out the problem, that'd be good, too.

A: 

Since jdk1.4 Java itself comes along with XML API implementation. Which would be used unless you specifically endorse and instruct jvm to use "Xalan" or any other XML API implementation.

My guess is that in your linux system you r jdk installation is either having Xalan and xml-api jars in the jre/lib/endorsed folder or when you start your server you given the vm argument -Djava.endorsed.dirs... to the path where Xalan jar exists. Or in your web application you flipped the order of class loading to look at local classes first and Xalan is in your web application class path.

You can override the XML implementation given by default by jre using one of the approaches and it seems most likely one of them is true for your linux environment.

Fazal