servlet exception

Discussion in 'Java' started by Nag, Jul 1, 2005.

  1. Nag

    Nag Guest

    Hi
    I am getting following exception, could any one tell me assist me in
    solving the problem.

    ApplicationDispatcher[/Webstore]: Servlet.service() for servlet
    batchcategorydisplay threw exception
    org.apache.jasper.JasperException
    at
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
    at
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
    at
    org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
    at
    org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
    at
    com.redenvelope.webstore.BatchCategoryDisplayController.process(BatchCategoryDisplayController.java:139)
    at
    com.redenvelope.webstore.ReControllerServlet.doPost(ReControllerServlet.java:85)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    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:256)
    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.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:2415)
    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:171)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    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.coyote.http11.Http11Processor.process(Http11Processor.java:594)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
    at
    org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
    at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
    at java.lang.Thread.run(Thread.java:536)
    Nag, Jul 1, 2005
    #1
    1. Advertising

  2. Nag

    Wendy Smoak Guest

    "Nag" <> wrote:

    > I am getting following exception, could any one tell me assist me in
    > solving the problem.
    >
    > ApplicationDispatcher[/Webstore]: Servlet.service() for servlet
    > batchcategorydisplay threw exception
    > org.apache.jasper.JasperException

    ....
    >

    com.redenvelope.webstore.BatchCategoryDisplayController.process(BatchCategor
    yDisplayController.java:139)
    > at
    >

    com.redenvelope.webstore.ReControllerServlet.doPost(ReControllerServlet.java
    :85)

    What's happening on those two lines? Was there a "root cause" in the logs
    below the stack trace that you posted?

    --
    Wendy Smoak
    Wendy Smoak, Jul 1, 2005
    #2
    1. Advertising

  3. Nag

    Nag Guest

    At line 139, I am forwarding the control to my jsp page(
    batchcategorydisplay.jsp).
    the code is something like this:

    getServletContext().getNamedDispatcher("batchcategorydisplay").forward(req,
    resp);
    return;

    I found out the unusual thing, when i remove the jsp:usebean tags i am
    able to display the jsp page with static content. but when i use the
    jsp:usebean tags
    i am getting this error.
    I ran the controller class(BatchCategoryDisplayController.java) in
    debug mode, all the objects that are setting in request are holding
    some values. they are not nulls.
    i dont know what is the problem?

    thanks for your inputs.
    Nag, Jul 1, 2005
    #3
  4. Nag

    Wendy Smoak Guest

    "Nag" <> wrote:
    > At line 139, I am forwarding the control to my jsp page(
    > batchcategorydisplay.jsp).
    > the code is something like this:
    >
    > getServletContext().getNamedDispatcher("batchcategorydisplay").forward(req,
    > resp);
    > return;
    >
    > I found out the unusual thing, when i remove the jsp:usebean tags i am
    > able to display the jsp page with static content. but when i use the
    > jsp:usebean tags
    > i am getting this error.


    Sounds like you have a good start on debugging it, you know it's in the JSP
    and can make it go away. Since you have a debugger, figure out how to point
    it at the source code generated from the JSP, and step through that as well
    as the Servlet code.

    --
    Wendy Smoak
    Wendy Smoak, Jul 1, 2005
    #4
  5. Nag

    Nag Guest

    yeah..I fixed it. the problem was in my servlet.

    I used Hashmap.keySet(), which intrun returns the Set
    implementation..This set was passed to the jsp without making a Treeset
    object. my jsp:usebean was expecting a Treeset object. thats where the
    problem was.
    I modified the returned set into Treeset object and passed to the jsp.

    But the error is not at all relevant to the exception thrown in the
    stacktrace. Does it problem with my settings ??

    thanks,
    nag.
    Nag, Jul 1, 2005
    #5
  6. Nag

    Wendy Smoak Guest

    "Nag" <> wrote
    >
    > But the error is not at all relevant to the exception thrown in the
    > stacktrace. Does it problem with my settings ??
    >


    I still think there was more to that stack trace. There's usually a 'Root
    Cause' which in this case might have been a ClassCastException (depending on
    the code...) The JasperException only tells you where it happened, not
    (usually) exactly what it was.

    I haven't figured out the pattern, but I always check catalina.out (or the
    console), the 'localhost_log' file in Tomcat _and_ the log for the webapp
    itself. Different things show up in different places.

    --
    Wendy Smoak
    Wendy Smoak, Jul 1, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Fish
    Replies:
    4
    Views:
    2,392
    Andy Fish
    Dec 17, 2003
  2. Sean Clarke
    Replies:
    1
    Views:
    1,872
    Sudsy
    Jan 7, 2004
  3. circuit_breaker
    Replies:
    2
    Views:
    1,967
    Jack Jia
    Apr 4, 2004
  4. chamikara
    Replies:
    1
    Views:
    49,819
  5. javadev
    Replies:
    5
    Views:
    12,840
    javadev
    Nov 16, 2006
Loading...

Share This Page