Having XML parser/XSLT conflicts is a known issue in Tomcat 3.2.
I believe the saxon.jar would need to go in TOMCAT_HOME/lib.
If Tomcat won't start, perhaps a more compatible XML parser
that the current xerces.jar could be found.  If not, I think
you are out of luck with Tomcat 3.2.x.  Without knowing the
startup problem, I can't say for sure.

You will likely have better luck with Tomcat 3.3 or 4.0.1.
New classloader handling allows "server" classes to be
hidden from web applications.

In Tomcat 3.3, the default behavior is try to detect if a
web application has its own XML parser.  If found, Tomcat 3.3
keeps its crimson.jar and xalan.jar hidden from that web
application.  If not found, crimson.jar and xalan.jar are
included in the web application's classloader.  This behavior
is configurable should Tomcat 3.3 not detect saxon.jar as
an XML parser.

Tomcat 4.0.x implements the new feature in the Servlet 2.3
spec where classes in the web application's class loader
are used before classes in parent classloaders.  This
should also fix your problem.

Hope this helps.

Larry

> -----Original Message-----
> From: Hornsby Peter [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 23, 2001 11:51 AM
> To: '[EMAIL PROTECTED]'
> Subject: Tomcat 3.2 and Saxon
> 
> 
> Hi folks, newbie here, asking for help :-)
> 
> I'm having troubles using Tomcat 3.2 with Saxon.  My code imports the
> following:
> 
> import javax.xml.transform.TransformerFactory;
> import javax.xml.transform.Transformer;
> import javax.xml.transform.stream.StreamSource;
> import javax.xml.transform.stream.StreamResult;
> import javax.xml.transform.TransformerException;
> import javax.xml.transform.TransformerConfigurationException;
> 
> However, Tomcat returns 
> 
> 2001-10-23 16:15:21 - Ctx( /nimoi ): Exception in: R( /nimoi +
> /servlet/NimoiQue
> ry + null) - java.lang.NoSuchMethodError
>         at
> org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1451)
>         at
> org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
>         at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
>         at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
> 
>         at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(Transf
> ormerFactoryImpl.java:864)
> ....(more removed)
> 
> when I try and call 
> 
> TransformerHandler handler = stfactory.newTransformerHandler(new
> StreamSource(xslID));
> 
> From within my code.  As far as I can see, it is a problem with Tomcat
> being unable to find the right files.  Assuming the files are 
> contained
> within saxon.jar (any confirmation would be appreciated), 
> moving a copy
> of it to TOMCAT_HOME/lib would solve the problem...but unfortunately,
> Tomcat won't even start up.  The other files in TOMCAT_HOME/lib are:
> 
> ant.jar
> jasper.jar
> servlet.jar
> webserver.jar
> xerces.jar
> 
> Any idea what I can do to solve the problem?
> 
> Also, is it possible to set JVM settings (specifically memory 
> allocation
> settings) for running within Tomcat?
> 
> Thanks for any and all help,
> Pete 
> 
> 
> -- 
> The Information contained in this E-Mail and any subsequent 
> correspondence
> is private and is intended solely for the intended recipient(s).
> For those other than the recipient any disclosure, copying, 
> distribution, 
> or any action taken or omitted to be taken in reliance on 
> such information is
> prohibited and may be unlawful.
> 

Reply via email to