struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: struts-example error on starting Tomcat
Date Sat, 10 Jun 2000 18:21:30 GMT
Daniel Kehoe wrote:

> I added jaxp.jar and parser.jar to the Tomcat lib directory.
> Incidentally, the Tomcat.sh start script adds anything in the lib
> directory to the classpath. For evidence, see the "Starting
> tomcat..." messages below.
>

Note that Tomcat only adds the $TOMCAT_HOME/lib jar files to the classpath on Unix
systems, not on Windows systems.  Anyone who knows how to accomplish that trick in
the "tomcat.bat" file is welcome to propose a patch.

>
> For good measure, I added the jaxp.jar and parser.jar to my classpath:
>
> [kehoe@www3 kehoe]$ env
> TOMCAT_HOME=/usr/local/tomcat
> JAVA_HOME=/usr/local/jdk1.2.2
> CLASSPATH=/usr/local/tomcat/lib/jaxp.jar:/usr/local/tomcat/lib/parser.
> jar:/home/
> docroot/WebSPARCS/websparcs/WEB-INF/classes/:/usr/local/tomcat/lib/act
> ivation.ja
> r:/usr/local/tomcat/lib/mail.jar/:/usr/local/tomcat/lib/gnu-regexp.jar
> :/usr/loca
> l/tomcat/lib/servlet.jar:/home/docroot/websparcs/WEB-INF/classes/
>
> The files are in place and readable (I removed xerces.jar and
> xalan.jar out of concern there might be conflict) :
>
> [kehoe@www3 lib]$ ls -lg /usr/local/tomcat/lib
> total 1900
> -rw-r--r--   1 kehoe    kehoe       80312 Feb  7 17:47 activation.jar
> -rw-r--r--   1 kehoe    kehoe      118562 Jun  8 03:45 ant.jar
> -rw-r--r--   1 kehoe    kehoe      218031 Jan 11  1970 cocoon.jar
> -rw-r--r--   1 kehoe    kehoe      246139 Jan 11  1970 fop.jar
> -rw-r--r--   1 kehoe    kehoe       23153 Mar 21  1999 gnu-regexp.jar
> -rw-r--r--   1 kehoe    kehoe      194969 Apr  4 14:58 jasper.jar
> -rw-r--r--   1 kehoe    kehoe        5618 Jun  8 18:00 jaxp.jar
> -rw-r--r--   1 kehoe    kehoe      207721 Feb  7 17:47 mail.jar
> -rw-r--r--   1 kehoe    kehoe      136130 Jun  8 18:08 parser.jar
> -rw-r--r--   1 kehoe    kehoe       40871 Apr  4 14:58 servlet.jar
> drwxr-x--x   3 kehoe    kehoe        4096 Apr  4 14:58 test/
> -rw-r--r--   1 kehoe    kehoe      476283 Apr  4 14:58 webserver.jar
> -rw-r--r--   1 kehoe    kehoe      132473 Apr  4 14:58 xml.jar
>
>  From the looks of the "Starting tomcat..." messages, the classpath is
> set correctly. But I get the error:
> java.lang.NoClassDefFoundError: javax/xml/parsers/SAXParserFactory
>
> This is Red Hat Linux release 6.1 and a struts nightly build from 6/7.
>

This environment (plus the Sun distribution of the Linux JDK 1.2.2 and the Inprise
JIT compiler download) is exactly what I use.  I'm able to copy the
"struts-example.war" and "struts-documentation.war" files to my
$TOMCAT_HOME/webapps directory, start Tomcat, and access these apps successfully.

Are you by any chance using Tomcat 3.0 instead of 3.1?  The format of the log
messages you quote leads me to think this is true.  If so, it's probably not going
to work because Tomcat 3.0 will have problems using alternative XML parsers.

>
> Daniel
> kehoe@fortuity.com
>

Craig McClanahan



Mime
View raw message