On my own computer, using the following Debian packages
libtomcat5-java 5.0.30-7
tomcat5 5.0.30-7
tomcat5-admin 5.0.30-7
tomcat5-webapps 5.0.30-7
I get this exception
java.lang.NoClassDefFoundError
uk.ac.nactem.util.XMLWriter.write(XMLWriter.java:126)
on this line
SerializerFactory sFactory =
SerializerFactory.getSerializerFactory(outputFormat.getMethod());
of a class that includes the following imports
import javax.xml.parsers.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import javax.xml.transform.stream.*;
import org.apache.xml.serialize.*;
import org.w3c.dom.*;
import org.xml.sax.*;
when I try to run the program as a Tomcat webapp. But when I run it from
the console, the XMLWriter.write() method works without any problems and
produces the correct output.
On another computer (SuSE 9.2) with the following packages
struts-webapps-tomcat5-1.1-2
tomcat5-admin-webapps-5.0.27-9
tomcat5-5.0.27-9
tomcat5-webapps-5.0.27-9
the same web application runs and produces the correct output.
On both machines I installed the web application by deploying the same .war
file through the Tomcat manager.
I would be grateful for any suggestions for identifying and correcting the
discrepancy.
Roedy Green - 28 Nov 2005 16:04 GMT
> java.lang.NoClassDefFoundError
> uk.ac.nactem.util.XMLWriter.write(XMLWriter.java:126)
see http://mindprod.com/jgloss/caq.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.