You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Deon van der Merwe <dv...@truteq.co.za> on 2001/11/29 16:31:40 UTC

xsltc problems inside Tomcat 4.0.1

Hi All,

I have a simple application that uses the xalan XSLTC to transform
XML documents into HTML documents.  When running this stand-alone
(without Tomcat) it all works fine.

If I run this from a servlet inside Tomcat (4.0.1 and build 20011127)
I get one of the following errors:

Added to the my webapp is the following jar files:
- BCEL.jar
- xsltc.jar
- xalan.jar

The servlet need to load my application and read its configuration
from a static XML file.  I implemented a SAX ContentHandler like
this:
   public class SAXConfiguration
         extends org.xml.sax.helpers.DefaultHandler

Here is the error that I get:
===========
java.lang.LinkageError: loader constraints violated when linking 
org/xml/sax/helpers/DefaultHandler class
         at 
com.truteq.configuration.SAXConfiguration.<init>(SAXConfiguration.java:147)
===========
The line of code is this one:
       vSAXParser.parse (aInputStream, this);

Now I remove the "xalan.jar" file from the webapp.  The above error
is then fixed, but I get the following error:
===========
java.lang.NoClassDefFoundError: javax/xml/transform/Source
         at com.truteq.presentation.Index.init(Index.java:16)
         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
===========
This is expected as the XSLTC requires this. But why/how does it
interfere with the other SAX parser?



-Deon
_____________________________________________________
TruTeq Wireless (Pty) Ltd.        Tel +27 82 663 8617
http://www.truteq.com
Wireless communications for remote machine management