You've specified which version of saxon you are using but not which version of tomcat.  When you ask questions like this, you need to specify the versions of everything!  as well as verifying which SAX parser you are actually using.
 
Since you say you are using parser.jar for tomcat, you are probably using the 3.2.1 (or  earlier) version of tomcat.  The versions of jaxp.jar and parser.jar used in 3.2.1 support SAX 1, not SAX 2.  This is incompatible with saxon.  I don't recognize your specific error message, but the incompatibiliy between SAX 1 and SAX 2 is the most common source of errors when using saxon and tomcat 3.x.
 
If you changed to version 4.x of Tomcat, you likely wouldn't have this problem.  Tomcat 4.x uses a SAX 2 parser.  Here you might want to set the "javax.xml.parsers.SAXParserFactory" System property
explicitly to a validating SAX 2 parser like version 1.4.4 of xerces, since this version of tomcat requires a validating parser and uses the system property to find it, and since saxon comes with a non-validating parser.
 
You could probably also use the 3.2.2 version of Tomcat, which is distributed with the SAX 2 compliant xerces.jar rather than parser.jar.
 
If you stay with the 3.2.1 version of tomcat and still want to use saxon, you need to (1) delete the jaxp.jar file from the tomcat lib directory (this conflicts with the version of the jaxp classes in the saxon.jar file), (2) add a validating SAX 2 parser (e.g. xerces.jar) to the lib directory and set the "javax.xml.parsers.SAXParserFactory" System property to it, and (3) either reconfigure tomcat to use the SAX2 compliant parser or force parser.jar to the back of the classpath (which tomcat generates automatically.)
 
To reconfigure tomcat to use the SAX 2 compliant parser, say xerces, you can delete parser.jar from the tomcat lib directory and modify the tomcat config file workers.properties (in the conf directory), replacing
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)jaxp.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)parser.jar
 
with
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)xerces.jar
 
Alternatively, instead of deleting parser.jar and modifying workers.properties, you can likely just rename parser.jar to zparser.jar, which will have the effect of forcing it to the back of the classpath.
 
Regards,
Daniel Parker
----- Original Message -----
From: Armen Martirossian
To: saxon-help@sourceforge.net
Sent: Tuesday, October 01, 2002 4:09 AM
Subject: [saxon] Issue on Saxon

Hello!
 
I'm developing an XML/Java project(servlets generate dynamic XML then transform the XML to html, wml, etc.).
At the start I decided to use Xalan for my Java applications, since my the servlet-container is TomCat(supports Xalan). When the main block of XSLT was ready (I tested them with Saxon, from the command line), I was then shocked when knew that Xalan doesn't support node-sets (I used the feature many times in my stylesheets, since it worked with Saxon). Then, I changed the code and used xalan:nodeset() function in my XPath expressions. But it also did not work.
After that I decided to turn to Saxon (still having TomCat).
 
I set the property "javax.xml.transform.TransformerFactory" properly:
 
System.setProperty("javax.xml.transform.TransformerFactory", "com.icl.saxon.TransformerFactoryImpl");
 
but the servlet generates the following error:
 
2002-09-30 18:56:28 - Ctx( /CMWebApp ): Exception in: /CMWebApp/usermodule/en/html/welcome - java.lang.NoSuchMethodError
 at com.icl.saxon.TransformerFactoryImpl.getStyleParser(TransformerFactoryImpl.java:500)
 at com.icl.saxon.TransformerFactoryImpl.getSAXSource(TransformerFactoryImpl.java:184)
 at com.icl.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:124)
 at com.icl.saxon.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:77)
 at cm_application.Welcome.doGet(Welcome.java:338)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
 at org.apache.tomcat.core.Handler.service(Handler.java:287)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
 at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
 at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
 at java.lang.Thread.run(Thread.java:484)
 
 
I have Saxon 6.3.
 
My TomCat is configured with following set of archives:
lib/webserver.jar;
lib/jasper.jar;
lib/parser.jar;
lib/jaxp.jar
 
 
I can't see any way now. May be it's a result of conflict of TomCat and Saxon? Or something is wrong with classpath(conflict of JAXP1.0 and JAXP1.1)?
I tried but without result.
 
Thanks in advance.
 
Armen Martirossian
Hiweb
Yerevan, Armenia