servlet exception

N

Nag

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)
 
W

Wendy Smoak

Nag said:
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?
 
N

Nag

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.
 
W

Wendy Smoak

Nag said:
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.
 
N

Nag

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.
 
W

Wendy Smoak

Nag said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top