Greetings,

I have installed TOMCAT 3.2.1 in the past with no problems.  However,
now I have a problem that has got the best of me for the past few days
now. I am at my wits end.  I am getting an error when ever I access one
of the JSP examples that install with the Tomcat Package.  Here is an
example:

----------------------------------------------------------------------

URL: http://localhost:8080/examples/jsp/snp/snoop.jsp


This is the message I get in the browser:

  Error: 500
  Location: /examples/jsp/snp/snoop.jsp
  Internal Servlet Error:

  java.lang.NoSuchMethodError: javax.servlet.ServletException: method
getRootCause()Ljava/lang/Throwable; not found
        at
org.apache.tomcat.context.ExceptionHandler.doService(DefaultCMSetter.java:27
3)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at
org.apache.tomcat.core.ContextManager.handleError(ContextManager.java:1147)
        at org.apache.tomcat.core.Handler.service(Handler.java:311)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:479)

Notice it appears that getRootCause() is missing from
javax.servlet.ServletException. How can I prove this is not true?
Also notice that the message in the log file is totally different
(see below):

This is the message that can be found in jasper.log:

  2001-02-06 12:46:53 - JspEngine --> /jsp/snp/snoop.jsp
  2001-02-06 12:46:53 -        ServletPath: /jsp/snp/snoop.jsp
  2001-02-06 12:46:53 -           PathInfo: null
  2001-02-06 12:46:53 -           RealPath:
/etc/httpd/tomcat/jakarta-tomcat-3.2.1/webapps/examples/jsp/snp/snoop.jsp
  2001-02-06 12:46:53 -         RequestURI: /examples/jsp/snp/snoop.jsp
  2001-02-06 12:46:53 -        QueryString: null
  2001-02-06 12:46:53 -     Request Params:
  2001-02-06 12:46:53 - Classpath according to the Servlet Engine is:
/etc/httpd/tomcat/jakarta-tomcat-3.2.1/webapps/examples/WEB-INF/classes
  2001-02-06 12:46:53 - JspReader: Exception parsing file
/jsp/snp/snoop.jsp - java.lang.NoSuchMethodError:
javax.servlet.ServletContext: method
getResourceAsStream(Ljava/lang/String;)Ljava/io/InputStream; not found
        at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:193)
        at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:146)
        at org.apache.jasper.compiler.JspReader.<init>(JspReader.java:262)
        at
org.apache.jasper.compiler.JspReader.createJspReader(JspReader.java:268)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:155)
        at
org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
        at
org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
        at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
        at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:152)
        at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:164)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:479)

Notice it appears that getResourceAsStream() is missing from
javax.servlet.ServletContext. How can I prove this is not true? Which
message is the reliable one?  The message I get in the browser or
the message I get in the log file?

----------------------------------------------------------------------


I get the same thing for all JSP pages that ship with the package.  Again
the package is untouched!  I just untared it and started it up using
$TOMCAT_HOME/bin/startup.sh.  Here is what my machine's environment and
makeup looks like:


RedHat Linux 7.0

  kernal 2.2.17

Jakarta-Tomcat-3.2.1

  installed in: /etc/httpd/tomcat/jakarta-tomcat-3.2.1
  symbolic link: /etc/httpd/tomcat/current ->
/etc/httpd/tomcat/jakarta-tomcat-3.2.1

  Currently running in "Stand-Alone" mode.  Want to get that working
  before I hook it up to Apache.

  * Yes, I have tried getting rid of the symbolic link, that makes
    no difference.

I start and stop the application as root.  Here is my environment:

  PWD=/etc/httpd/tomcat
  USER=root
  MACHTYPE=i386-redhat-linux-gnu
  INPUTRC=/etc/inputrc
  BASH_ENV=/root/.bashrc
  EDITOR=/usr/bin/pico
  LANG=en_US
  TOMCAT_HOME=/etc/httpd/tomcat/current
  JAVA_HOME=/usr/local/bin/jdk1.2.2/
  LOGNAME=root
  SHLVL=1
  SHELL=/bin/bash
  USERNAME=root
  HOSTTYPE=i386
  OSTYPE=linux-gnu
  HOME=/root

PATH=/usr/local/sbin:/usr/sbin:/sbin:.:/bin:/sbin:/usr/bin:/usr/sbin:/usr/lo
cal/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin
  _=/usr/bin/env


Here is the environment when Tomcat starts:

  [13:01:14] root> tomcat.sh env
  Setting classpath to:
/etc/httpd/tomcat/current/lib/ant.jar:/etc/httpd/tomcat/current/lib/jasper.j
ar:/etc/httpd/tomcat/current/lib/jaxp.jar:/etc/httpd/tomcat/current/lib/pars
er.jar:/etc/httpd/tomcat/current/lib/servlet.jar:/etc/httpd/tomcat/current/l
ib/test:/etc/httpd/tomcat/current/lib/webserver.jar:/usr/local/bin/jdk1.2.2/
/lib/tools.jar

  * All paths referenced in this classpath are valid.


Please let me know if you have any ideas that I can try. Here is a list
of what has been suggested, or what I have tried already:

1. I installed the new Tomcat 4.0 beta 1 and most of the JSP examples
   worked there.  I could not get a newly created context type to work
   though.  It kept giving me a 503 error.  There is little to no
   documentation for this yet, so I gave up on it. I don't want to run
   a beta anyhow.

2. I tried using Jdk1.3.  This yielded other errors. After further
   investigation I learned that Tomcat 3.2x does not run nicely
   with Jdk1.3 and they suggest using jdk1.2.2.  I have always used
   Jdk1.2.2 in the past with my successful installs, so I guess for
   now I'll settle.  BTW: Tomcat 4.0 beta 1 ran nicely with Jdk1.3

3. I tried replacing the servlet.jar in /etc/httpd/tomcat/current/lib/
   with the latest release from
http://java.sun.com/products/servlet/download.html.
   This again made no difference.

Anything else that someone could suggest would be extremely helpful.
Thanks for your time...

___________________________________________________________________
Steven D. Theisen                 Bell & Howell Publishing Services
[EMAIL PROTECTED]                      3900 Kinross Lakes Parkway
Software Engineer                            Richfield, Ohio  44286
Media Solutions Group                  PH: 330.659.1600   Ext. 1876


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to