Wonderful! it worked! as in I got an error message.  There was no stack
trace printed out but the error message is

java.lang.NoClassDefFoundError: javax/servlet/ServletRequest


On Fri, 27 Sep 2002, Tim Funk wrote:

> No, there is probably and uncaught exception in your code. Instead of my
> previous post - you can change:
>  >   } catch( Exception e )
>   TO
>  >   } catch( Throwable e )
>
> NullPointerExceptions and other exceptions are not caught by Exception
> but they are caught by Throwable, which is the lowest level.
>
> Failing that - do wrap the entire page in the snippet I provided. If the
> snippet you provided was the ENTIRE page - then my wrapping the entire
> page suggestion is useless. (I am not accustomed to very short JSP pages)
>
>
> Atif Shahab wrote:
> > I don't get it.
> >
> > currently I have
> >
> > <%@ page import="java.util.*, java.io.*, com.oreilly.servlet.*,
> > com.oreilly.servlet.multipart.*" %>
> > <%
> >   try
> >   {
> >     int DEFAULT_MAX_POST_SIZE = 1024 * 1024;
> >         MultipartParser parser;
> >         parser = new MultipartParser( request
> >                                   , DEFAULT_MAX_POST_SIZE );
> >   } catch( Exception e )
> >   {
> >     out.println( "Sorry! An error was detected" );
> >   }
> > %>
> >
> > 1. you want me put another try over this block?
> > or
> > 2. make another page and then include this page?
> >
> > if it's optione 1 then doing that doesn't help.  This exeception is
> > comming from the code generated by tomcat.  It doesn't even seem to get
> > to my code. If an exception is generated by my code then I should have
> > caught it and not the exception handler code generated by tomcat.
> >
> > Another question is, is this a bug in tomcat?  Initially I was more
> > inclined to believe that it was my code but it seems that somehow tomcat
> > is screwing up.
> >
> >
> >  On Fri, 27 Sep 2002, Tim Funk wrote:
> >
> >
> >>I can't tell the exact error from the stack trace and code. When this
> >>happens to me, I wrap the entire page in a try/catch similar to the
> >>following:
> >>
> >><%try { %>
> >>YOUR JSP PAGE HERE
> >><%
> >>   } catch(Throwable e) {
> >>     e.printStackTrace();
> >>     out.println("D'oh: an error occurred - go see the catalina.out!");
> >>     out.println("Here's a hint: <PRE>" + e + "</PRE>");
> >>   }
> >>%>
> >>
> >>
> >>The stacktrace will show where the REAL error occured and you can follow
> >>it from there. Currently the error is being wrapped by multiple
> >>ServletExceptions and the error handler(by tomcat) isn't logging deep
> >>enough. (I think)
> >>
> >>
> >>Atif Shahab wrote:
> >>
> >>>ok, here is the code generated by tomcat (line numbers added by me).  Also
> >>>the compiler doesn't seem to have any problems compiling, this is a run
> >>>time error.
> >>>
> >>>47:  try
> >>>48:   {
> >>>49:    int DEFAULT_MAX_POST_SIZE = 1024 * 1024;
> >>>50:        MultipartParser parser;
> >>>51:        parser = new MultipartParser( request
> >>>52:                                  , DEFAULT_MAX_POST_SIZE );
> >>>53:  } catch( Exception e )
> >>>54:  {
> >>>55:    out.println( "Sorry! An error was detected" );
> >>>56:  }
> >>>57:      out.write("\n");
> >>>58:    } catch (Throwable t) {
> >>>59:      out = _jspx_out;
> >>>60:      if (out != null && out.getBufferSize() != 0)
> >>>61:        out.clearBuffer();
> >>>62:      if (pageContext != null) pageContext.handlePageException(t);
> >>>63:    } finally {
> >>>64:      if (_jspxFactory != null)
> >>>65:_jspxFactory.releasePageContext(pageContext);
> >>>66:    }
> >>>67:  }
> >>>68:}
> >>>
> >>>
> >>>On Thu, 26 Sep 2002, Tim Funk wrote:
> >>>
> >>>
> >>>
> >>>>Look for a file called testing_jsp.java. This is the java file created
> >>>>by your JSP by tomcat. Line 62 will give you more insight to the error.
> >>>>
> >>>>The java file should be buried somewhere under $CATALINA_HOME/work. Use
> >>>>a find command to locate the file.
> >>>>
> >>>>Atif Shahab wrote:
> >>>>
> >>>>
> >>>>>hope this helps
> >>>>>
> >>>>>---------------------------------------------
> >>>>>
> >>>>>HTTP Status 500 -
> >>>>>
> >>>>>type Exception report
> >>>>>
> >>>>>message
> >>>>>
> >>>>>description The server encountered an internal error () that prevented it
> >>>>
> >>>>>from fulfilling this request.
> >>>>
> >>>>>exception
> >>>>>
> >>>>>org.apache.jasper.JasperException: javax/servlet/ServletRequest
> >>>>> at
> >>>>>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:246)
> >>>>> at
> >>>>>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
> >>>>> at
> >>>>>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
> >>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> >>>>> at
> >>>>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >>>>> at
> >>>>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> >>>>> at
> >>>>>org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> >>>>> at
> >>>>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >>>>> at
> >>>>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >>>>> at
> >>>>>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2397)
> >>>>> at
> >>>>>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> >>>>> at
> 
>>>>>>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> >>>>> at
> >>>>>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> >>>>> at
> >>>>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >>>>> at
> >>>>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> >>>>> at
> >>>>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >>>>> at
> >>>>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >>>>> at
> >>>>>org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> >>>>> at
> >>>>>org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:256)
> >>>>> at
> >>>>>org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:361)
> >>>>> at
> >>>>>org.apache.jk.common.ChannelUn.processConnection(ChannelUn.java:253)
> >>>>> at org.apache.jk.common.AprConnection.runIt(ChannelUn.java:314)
> >>>>> at
> 
>>>>>>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
> >>>>> at java.lang.Thread.run(Thread.java:536)
> >>>>>
> >>>>>root cause
> >>>>>
> >>>>>javax.servlet.ServletException: javax/servlet/ServletRequest
> >>>>> at
> 
>>>>>>org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:497)
> >>>>> at org.apache.jsp.testing_jsp._jspService(testing_jsp.java:62)
> >>>>> at
> >>>>>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
> >>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >>>>> at
> >>>>>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:202)
> >>>>> at
> >>>>>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
> >>>>> at
> >>>>>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
> >>>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> >>>>> at
> >>>>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >>>>> at
> >>>>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> >>>>> at
> >>>>>org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> >>>>> at
> >>>>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >>>>> at
> >>>>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >>>>> at
> >>>>>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2397)
> >>>>> at
> >>>>>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> >>>>> at
> 
>>>>>>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> >>>>> at
> >>>>>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> >>>>> at
> >>>>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >>>>> at
> >>>>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> >>>>> at
> 
>>>>>>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> >>>>> at
> >>>>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >>>>> at
> >>>>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >>>>> at
> >>>>>org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> >>>>> at
> >>>>>org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:256)
> >>>>> at
> >>>>>org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:361)
> >>>>> at
> >>>>>org.apache.jk.common.ChannelUn.processConnection(ChannelUn.java:253)
> >>>>> at org.apache.jk.common.AprConnection.runIt(ChannelUn.java:314)
> >>>>> at
> 
>>>>>>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
> >>>>> at java.lang.Thread.run(Thread.java:536)
> >>>>>
> >>>>>Apache Tomcat/4.1.10
> >>>>>
> >>>>>
> >>>>>On Thu, 26 Sep 2002, Tim Moore wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>I can't really tell what the error is from that snippet. Can you post
> >>>>>>the whole stack trace?
> >>>>>>
> >>>>>>--
> >>>>>>Tim Moore / Blackboard Inc. / Software Engineer
> >>>>>>1899 L Street, NW / 5th Floor / Washington, DC 20036
> >>>>>>Phone 202-463-4860 ext. 258 / Fax 202-463-4863
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>-----Original Message-----
> >>>>>>>From: Atif Shahab [mailto:[EMAIL PROTECTED]]
> >>>>>>>Sent: Wednesday, September 25, 2002 11:00 PM
> >>>>>>>To: Tomcat Users List
> >>>>>>>Subject: javax error
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>Hi,
> >>>>>>>
> >>>>>>>I get the following run time error as the root cause
> >>>>>>>
> >>>>>>>javax.servlet.ServletException: javax/servlet/ServletRequest
> >>>>>>>at
> >>>>>>>org.apache.jasper.runtime.PageContextImpl.handlePageException(
> >>>>>>>PageContextImpl.java:497)
> >>>>>>>
> >>>>>>>does this mean that I have to install javax?  If so from
> >>>>>>>where can I obtain it for j2sdk-1.4.1.
> >>>>>>>
> >>>>>>>code:
> >>>>>>>-----
> >>>>>>>
> >>>>>>>jsp:
> >>>>>>>
> >>>>>>><%@ page import="java.util.*, java.io.*,
> >>>>>>>com.oreilly.servlet.*, com.oreilly.servlet.multipart.*" %> <%
> >>>>>>>try
> >>>>>>>{
> >>>>>>>  int DEFAULT_MAX_POST_SIZE = 1024 * 1024;
> >>>>>>>      MultipartParser parser;
> >>>>>>>      parser = new MultipartParser( request
> >>>>>>>                                , DEFAULT_MAX_POST_SIZE );
> >>>>>>>} catch( Exception e )
> >>>>>>>{
> >>>>>>>  out.println( "Sorry! An error was detected" );
> >>>>>>>}
> >>>>>>>%>
> >>>>>>>
> >>>>>>>
> >>>>>>>The problematic code is
> >>>>>>>
> >>>>>>>parser = new MultipartParser( request
> >>>>>>>                                , DEFAULT_MAX_POST_SIZE );
> >>>>>>>
> >>>>>>>Regards
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to