You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Larry Rogers <La...@mercmarine.com> on 2000/07/04 05:41:00 UTC

Running Struts example


I've been following the discussion on both the user and dev lists, and I've read
all the fine documentation from Craig.  I'm excited to begin using the framework
for my apps!So, I'm trying to deploy the Struts framework on Apache with Tomcat
3.1 deployed with Apache on RedHat Linux 6.2 (I'm trying to transition from the
Windows world, too!).

I was able to start Tomcat and request static pages from Apache and to run all
the JSP and servlet samples that come with Tomcat.  I was also able to run the
struts-documentation application, all on port 8080.Then I installed the
struts-example app and I think that's when things fell apart.

Now when I try to start Tomcat, I get the following:

[rogersl@localhost bin]$ ./tomcat.sh
startException in thread "main" java.lang.NoClassDefFoundError:
org/apache/tomcat/shell/Startup
Guessing TOMCAT_HOME from tomcat.sh to ./..
Setting TOMCAT_HOME to ./..
Using classpath:
.:./../lib/ant.jar:./../lib/jasper.jar:./../lib/servlet.jar:./../lib/test:./../lib/webserver.jar:./../lib/xml.jar:/usr/local/jdk1.2.2/bin/../lib/tools.jar:/usr/local/jaxp1.0.1
[rogersl@localhost bin]$ Starting tomcat. Check logs/tomcat.log for error
messages
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/xml/parsers/SAXParserFactory
     at
     at org.apache.struts.digester.Digester.parse(Digester.java:743)
     at org.apache.struts.example.DatabaseServlet.load(DatabaseServlet.java:282)
     at org.apache.struts.example.DatabaseServlet.init(DatabaseServlet.java:175)
     at javax.servlet.GenericServlet.init(GenericServlet.java:258)
     at
org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:315)
     at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:276)
     at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:132)
     at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:227)
     at org.apache.tomcat.core.ContextManager.init(ContextManager.java:201)
     at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:156)
     at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)

I can still request pages from Apache on port 80, but nothing from 8080.  As you
can see, webserver.jar is in the CLASSPATH, and I verified that the Startup
class is indeed in the jar file.

If anyone can suggest where to look next to get Struts working, I would
appreciate it.  Also, can you tell me why Tomcat is not starting correctly
anymore?

BTW, I had this all working great under WinNT Server 4, IIS 4 and JRun.

TIA,

Larry Rogers



Re: Running Struts example

Posted by "Matt D. Herold" <ma...@cYtechs.de>.
On Mon, Jul 03, 2000 at 10:41:00PM -0500, Larry Rogers wrote:

> Now when I try to start Tomcat, I get the following:
> 
> [rogersl@localhost bin]$ ./tomcat.sh
> startException in thread "main" java.lang.NoClassDefFoundError:
> org/apache/tomcat/shell/Startup
> Guessing TOMCAT_HOME from tomcat.sh to ./..
> Setting TOMCAT_HOME to ./..
> Using classpath:
> .:./../lib/ant.jar:./../lib/jasper.jar:./../lib/servlet.jar: \
> ./../lib/test:./../lib/webserver.jar:./../lib/xml.jar: \
> /usr/local/jdk1.2.2/bin/../lib/tools.jar:/usr/local/jaxp1.0.1
                                           ^^^^^^^^^^^^^^^^^^^^^

This is the problem. Jaxp isn't found, I think. Make sure
you specify the exact positions of your jars (for instance
/usr/local/jaxp1.0.1/jaxp.jar or something like that).

AFAIR you need to include parser.jar, too. (should be in the
directory were jaxp.jar is).


Matt

RE: Running Struts example

Posted by Robert Edgar <ro...@hkstar.com>.
Larry,
Looks like it cant find the JAXP libs,
Make sure jaxp.jar and parser.jar really are in the classpath, actually I
put mine in jakarta-tomcat/classes just to make sure....

Rob

-----Original Message-----
From: Larry Rogers [mailto:Larry_Rogers@mercmarine.com]
Sent: Tuesday, July 04, 2000 11:41 AM
To: struts-user@jakarta.apache.org
Subject: Running Struts example




I've been following the discussion on both the user and dev lists, and I've
read
all the fine documentation from Craig.  I'm excited to begin using the
framework
for my apps!So, I'm trying to deploy the Struts framework on Apache with
Tomcat
3.1 deployed with Apache on RedHat Linux 6.2 (I'm trying to transition from
the
Windows world, too!).

I was able to start Tomcat and request static pages from Apache and to run
all
the JSP and servlet samples that come with Tomcat.  I was also able to run
the
struts-documentation application, all on port 8080.Then I installed the
struts-example app and I think that's when things fell apart.

Now when I try to start Tomcat, I get the following:

[rogersl@localhost bin]$ ./tomcat.sh
startException in thread "main" java.lang.NoClassDefFoundError:
org/apache/tomcat/shell/Startup
Guessing TOMCAT_HOME from tomcat.sh to ./..
Setting TOMCAT_HOME to ./..
Using classpath:
.:./../lib/ant.jar:./../lib/jasper.jar:./../lib/servlet.jar:./../lib/test:./
../lib/webserver.jar:./../lib/xml.jar:/usr/local/jdk1.2.2/bin/../lib/tools.j
ar:/usr/local/jaxp1.0.1
[rogersl@localhost bin]$ Starting tomcat. Check logs/tomcat.log for error
messages
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/xml/parsers/SAXParserFactory
     at
     at org.apache.struts.digester.Digester.parse(Digester.java:743)
     at
org.apache.struts.example.DatabaseServlet.load(DatabaseServlet.java:282)
     at
org.apache.struts.example.DatabaseServlet.init(DatabaseServlet.java:175)
     at javax.servlet.GenericServlet.init(GenericServlet.java:258)
     at
org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:315)
     at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:276)
     at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartup
Interceptor.java:132)
     at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:227)
     at org.apache.tomcat.core.ContextManager.init(ContextManager.java:201)
     at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:156)
     at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)

I can still request pages from Apache on port 80, but nothing from 8080.  As
you
can see, webserver.jar is in the CLASSPATH, and I verified that the Startup
class is indeed in the jar file.

If anyone can suggest where to look next to get Struts working, I would
appreciate it.  Also, can you tell me why Tomcat is not starting correctly
anymore?

BTW, I had this all working great under WinNT Server 4, IIS 4 and JRun.

TIA,

Larry Rogers