tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Getting continuous error
Date Mon, 19 Sep 2011 19:43:02 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anjib,

On 9/19/2011 1:09 PM, Anjib Mulepati wrote:
> When I run my web application developed using Struts 1.3.8 I am
> getting following error continuously.  I couldn't figure out so
> please help.
> 
> java.lang.StackOverflowError at 
> org.apache.catalina.connector.Request.doGetSession(Request.java:2282)
>
> 
at org.apache.catalina.connector.Request.getSession(Request.java:2074)
> at 
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
>
>  at 
> javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
>
>  at 
> org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:544)
>
>
> 
[lots more that look like this]
> 
> at 
> org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:493)
>
>  at 
> org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:622)

Okay,
> 
so Struts is trying to get a saved Locale from the session, so
it calls request.getSession which ends up with a big problem.

There are several things that could be happening:

1. There is a self-call in ApplicationHttpRequest.getSession /
HttpServletRequestWrapper.getSession

2. You have wrapped a session with itself

3. You have a huge number of server-side forwards that all wrap the
request, so you get a very deep stack when trying to actually get the
original request

4. You have an error in an error page so it continuously forwards to
itself

#1 is probably not the case. #2 and #3 and #4 are much more likely.
Let's look at the rest of the stack trace to see how deep we are in
other things:

> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>
> 
[...]
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)

There's
> 
a forward. Let's see what else there is:

> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>
> 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)

Action servlet is running again. Hmm...

> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>
> 
[...]
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
>
> 
[...]
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>
> 
[...]
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
>
> 
[...]
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>
> 
[...]
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
>
> 
[...]
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
>
> 
[...]
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>
> 
[...]
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
>
> 
[...]
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>
> 
[...]
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
>
> 
[...]
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
>
> 
[...]
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
>
> 
[...]

Starting to see a pattern?

You didn't post the whole stack trace, but I'm guessing that at some
point, you got back to the real Tomcat code that originally processes
the request that then gets looped.

Given the above stack trace, I would say that you either have a
server-side forward that is out of control (forwarding to itself over
and over again) or you have an error page that is causing an error
(which is really a special case of the first case).

Time to take a look at the URLs that are being requested during those
forwards.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk53m0YACgkQ9CaO5/Lv0PD/xQCguxdgJWgBirLVKb2+wnIja6o6
t+AAoIJdojq5Onqi/zOgpp5Ex8dmlTNe
=c2tW
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message