struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kehoe <ke...@fortuity.com>
Subject Re: struts-example error on starting Tomcat
Date Fri, 09 Jun 2000 19:17:10 GMT
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.

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.

Daniel
kehoe@fortuity.com

Starting tomcat. Check logs/tomcat.log for error messages
<l:tomcat install="/usr/local/tomcat" home="/usr/local/tomcat" 
classPath=".:/usr
/local/tomcat/lib/activation.jar:/usr/local/tomcat/lib/ant.jar:/usr/lo 
cal/tomcat
/lib/cocoon.jar:/usr/local/tomcat/lib/fop.jar:/usr/local/tomcat/lib/gn 
u-regexp.j
ar:/usr/local/tomcat/lib/jasper.jar:/usr/local/tomcat/lib/jaxp.jar:/us 
r/local/to
mcat/lib/mail.jar:/usr/local/tomcat/lib/parser.jar:/usr/local/tomcat/l 
ib/servlet
.jar:/usr/local/tomcat/lib/test:/usr/local/tomcat/lib/webserver.jar:/u 
sr/local/t
omcat/lib/xml.jar:/usr/local/jdk1.2.2/lib/tools.jar:/usr/local/tomcat/ 
lib/jaxp.j
ar:/usr/local/tomcat/lib/parser.jar:/home/docroot/WebSPARCS/websparcs/ 
WEB-INF/cl
asses/:/usr/local/tomcat/lib/activation.jar:/usr/local/tomcat/lib/mail 
.jar/:/usr
/local/tomcat/lib/gnu-regexp.jar:/usr/local/tomcat/lib/servlet.jar:/ho 
me/docroot
/websparcs/WEB-INF/classes/" />
<l:autoLoadContext docBase="/usr/local/tomcat/webapps/admin" />
<l:addContext path="/admin"  docBase="/usr/local/tomcat/webapps/admin" />
<l:autoLoadContext docBase="/usr/local/tomcat/webapps/struts-documentation" />
<l:addContext path="/struts-documentation" 
docBase="/usr/local/tomcat/webapps/s
truts-documentation" />
<l:autoLoadContext docBase="/usr/local/tomcat/webapps/struts-example" />
<l:addContext path="/struts-example" 
docBase="/usr/local/tomcat/webapps/struts-
example" />
Exception in thread "main" java.lang.NoClassDefFoundError: 
javax/xml/parsers/SAX
ParserFactory
         at 
org.apache.struts.digester.Digester.getParser(Digester.java, Compiled
  Code)




At 1:16 PM +0200 6/9/00, Johannes O. Akinlaja wrote:
>Hi Daniel,
>
>    in Craigs readme you are asked to install an xml parser.
>- Download and install an XML parser that is compatible with the Java
>  API for XML Parsing (JAXP) specification.  A useful XML parser is the
>  JAXP Reference Implementation, version 1.0.1 or later, that is available
>  at <http://java.sun.com/xml>.  Be sure to add the "jaxp.jar" and
>  "parser.jar" (or whatever JAR file comes with your parser) files to
>  your CLASSPATH environment variable.
>
>Just follow this step, and the project should run.
>
>
>----- Original Message -----
>From: "Daniel Kehoe" <kehoe@fortuity.com>
>To: <struts-user@jakarta.apache.org>
>Sent: Friday, June 09, 2000 6:22 AM
>Subject: struts-example error on starting Tomcat
>
>
> > When I add struts-example to my Tomcat webapps, I get the following
> > error on starting Tomcat. Cocoon was already installed and runs okay.
> > I tried adding jaxp.jar and parser.jar but the problem persists.
> >
> > Daniel
> > kehoe@fortuity.com
> >
> > Starting tomcat. Check logs/tomcat.log for error messages
> > <l:tomcat install="/usr/local/tomcat" home="/usr/local/tomcat"
> > classPath=".:/usr
> > /local/tomcat/lib/activation.jar:/usr/local/tomcat/lib/ant.jar:/usr/lo
> > cal/tomcat
> > /lib/cocoon.jar:/usr/local/tomcat/lib/fop.jar:/usr/local/tomcat/lib/gn
> > u-regexp.j
> > ar:/usr/local/tomcat/lib/jasper.jar:/usr/local/tomcat/lib/jaxp.jar:/us
> > r/local/to
> > mcat/lib/mail.jar:/usr/local/tomcat/lib/parser.jar:/usr/local/tomcat/l
> > ib/servlet
> > .jar:/usr/local/tomcat/lib/test:/usr/local/tomcat/lib/webserver.jar:/u
> > sr/local/t
> > omcat/lib/xalan.jar:/usr/local/tomcat/lib/xerces.jar:/usr/local/tomcat
> > /lib/xml.j
> > ar:/usr/local/jdk1.2.2/lib/tools.jar:/usr/local/tomcat/lib/activation.
> > jar:/usr/local/tomcat/lib/mail.jar/:/usr/local/tomcat/lib/gnu-regexp.j
> > ar:/usr/local/tomcat/lib/servlet.jar" />
> > <l:autoLoadContext docBase="/usr/local/tomcat/webapps/admin" />
> > <l:addContext path="/admin"  docBase="/usr/local/tomcat/webapps/admin" />
> > <l:autoLoadContext
>docBase="/usr/local/tomcat/webapps/struts-documentation" />
> > <l:addContext path="/struts-documentation"
> > docBase="/usr/local/tomcat/webapps/s
> > truts-documentation" />
> > <l:autoLoadContext docBase="/usr/local/tomcat/webapps/struts-example" />
> > <l:addContext path="/struts-example"
> > docBase="/usr/local/tomcat/webapps/struts-
> > example" />
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> > javax/xml/parsers/SAX
> > ParserFactory
> >          at
> > org.apache.struts.digester.Digester.getParser(Digester.java, Compiled
> >   Code)
> >
> >
> > [kehoe@www3 lib]$ ls -lg
> > total 3832
> > -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      857171 Jan 11  1970 xalan.jar
> > -rw-r--r--   1 kehoe    kehoe     1106050 Jan 11  1970 xerces.jar
> > -rw-r--r--   1 kehoe    kehoe      132473 Apr  4 14:58 xml.jar
> >


Mime
View raw message