XSLT-SXS :java.lang.ClassCastException

I’m trying to use the XSLT Server X-Tension, but when I try to run the example, tamino returned this exception message :
javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.lang.ClassCastException.
I’m using Xalan, and i put all .jar files (xalan.jar,xp.jar,jaxp-api.jar…) in the private Classpath.
Thanks for your help.

Hi Carine

Try to set the jar files in the public classpath. If this doesn’t help there must be something wrong with the configuration of the transformation.

Best regards

Julius Geppert
Software AG

Hello Julius,

I encounter the same problem.

Environment: Tamino v4.1.4.4 on Windows 2000 Pro or on RedHat Linux AS 2.1

I use XALAN 1.3.1, JAXP 1.1 and XP 1.2.
I configured the SXS using the provided “SXS-Configuration_Xalan.xml” file.

I tried to define the java packages I use in several place:
- The SXS private Classpath
- The CLASSPATH environment variable
- The registry: key “HKEY_LOCAL_MACHINE\SOFTWARE\Software AG\Tamino\\SXS”, value "java classpath"

I add some traces in the source code of the SXS and I found where the exception ‘ClassCastException’ is raised:
The exception is raised when ‘template’ object is instanciate in the ‘getTemplate’ method:

TransformerFactory factory = TransformerFactory.newInstance( );
template = factory.newTemplates( xslSource );
catch( Exception exception )
throw exception;

What is it wrong? Is there any imcompatibility with the JAVA Packages I used?



Hi Ludovic,

did you try to set the SXS public classpath (in System Management Hub ->Tamino->X-Tension Tools, Button ‘X-Tension Settings’)?

I know that environment variable %CLASSPATH% and the SXS private classpath don’t work.

But I have no idea why the registry key mentioned in your mail doesn’t work. As this key is an undocumented feature it should not be used anyway.


Julius Geppert
Software AG
Tamino QE

Hi Julius,

I did not try to set the SXS public classpath, but I will…

About the registry key mentioned, I know that this key is not documented but it seems to be the only way to successfully install the XSLT-SXS in a v4 DB.



Hello Julius,

I set the SXS public classpath as you said but the problem still occurs.

Do you have any other advice to help me?



Hi Ludovic,
Try the following; it might help…

First though:
1. What I’m about to describe may effect other Software AG products that use the JRE we use and Xalan. Normally it should not, but you never know!
2. You may want to upgrade your Xalan to a 2.x version - I’ve never tried this with a 1.3 version (I’ll be surprised if it works!)

Under Windows do the following:
1. Goto the directory "C:\Program Files\Common Files\Software AG\jre 1.4.1_01\lib"
2. Create a directory called endorsed
3. Copy Xalan.jar into this directory.
NOTE: Do not copy JAXP into this directory.

Now restart Tamino and see if the problem still persists; if it does, you should get
in-touch with your local support and get them to open a problem.

Assuming it does work; here is the reason for what you are seeing. With Java 1.4 onwards, Sun have bundled a number of packages under a mechanism they call “Endorsed Standards”. The steps I’ve given above are one of the methods for overriding the endorsed standard. For those that are interested, you can find information under:
- http://java.sun.com/j2se/1.4.2/docs/guide/standards/index.html (for details about the endorsed standards override mechanism)
- http://xml.apache.org/xalan-j/faq.html#faq-N100CC (for details from Xalan and specifically the issue with Java 1.4)

Hope this helps.

R&D Tamino Server

Hello Gary,

I did the test you described.
I have to say first that I am not using Xalan 1.3.1 but Xalan 2.6.0 (I did a mistake when I check the manifest of the JAR file).

You solution is not working.
I know that the Xalan package I put in the “endorsed” directory is used because I cannot not delete it when the Tamino server is running.

I cannot open a problem because the SXS is only supported through this forum.

Anyway I make it work !
I add the following jar files in the “java classpath” value of the “HKEY_LOCAL_MACHINE\SOFTWARE\Software AG\Tamino\\SXS” key in the registry:

- jaxp.jar: version 1.2.3
- xalan.jar: version 2.6.0
- xp.jar: version 1.2
- xercesImpl.jar: 2.6.2

The problem comes from the missing of Xerces. In the XSLT SXS documentation, Xerces is not a required package but as it is a required package for making Xalan works I think Xerces should be added to the required package list for the XSLT SXS.

By the way, adding the same packages in the JAVA CLASSPATH in the system environment does not work.

Thank you for your help.