Why does jsp: include (sometimes) cause StackOverflowErrors in the Google App Engine?

I am experiencing StackOverflowErrors with all requests for the latest version of the application in GAE. I tracked Issue # 3588 , but it was closed because the reporter accused him of a third-party library, and the Google engineer did not want to look further. In my case, there is no third-party library. I just make a very simple jsp: include in my page template.

The recorded error starts as follows:

 java.lang.StackOverflowError at java.util.HashMap.removeEntryForKey(HashMap.java:565) at java.util.HashMap.remove(HashMap.java:555) at org.mortbay.util.AttributesMap.removeAttribute(AttributesMap.java:51) at org.mortbay.jetty.servlet.Dispatcher$ForwardAttributes.setAttribute(Dispatcher.java:441) at org.mortbay.jetty.servlet.Dispatcher$ForwardAttributes.removeAttribute(Dispatcher.java:461) at org.mortbay.jetty.servlet.Dispatcher$IncludeAttributes.setAttribute(Dispatcher.java:549) at org.mortbay.jetty.servlet.Dispatcher$IncludeAttributes.removeAttribute(Dispatcher.java:569) at org.mortbay.jetty.servlet.Dispatcher$IncludeAttributes.setAttribute(Dispatcher.java:549) at org.mortbay.jetty.servlet.Dispatcher$IncludeAttributes.removeAttribute(Dispatcher.java:569) at org.mortbay.jetty.servlet.Dispatcher$IncludeAttributes.setAttribute(Dispatcher.java:549) at org.mortbay.jetty.servlet.Dispatcher$IncludeAttributes.removeAttribute(Dispatcher.java:569) 

Get / setAttribute causes a repeat for a while, then ...

 at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:145) at com.google.apphosting.runtime.jetty.ResourceFileServlet.serveWelcomeFileAsForward(ResourceFileServlet.java:340) at com.google.apphosting.runtime.jetty.ResourceFileServlet.maybeServeWelcomeFile(ResourceFileServlet.java:281) at com.google.apphosting.runtime.jetty.ResourceFileServlet.doGet(ResourceFileServlet.java:142) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:192) at 

And this block is also repeated.

Both reporters have question 3588, and I believe this applies to jsp: somehow inclusive. A previous version of my application worked and used jsp: include, but this new version also uses jsp: param and some EL syntax. They may be related to the problem, or they may not be. All this works in development. The problem only occurs after deployment to GAE, after which all page requests result in 500 server errors, and the logs show this StackOverflowError. None of the recorded stack traces mention my code anywhere.

The stack trace also mentions perhaps ServeWelcomeFile and serveWelcomeFileAsForward. Nothing has changed in my definitions of welcome files in web.xml with this latest version.

Google Search has raised the issue related above, but nothing more. My next steps will try to isolate the exact changes that caused this, but any understanding that others can provide would be very helpful.

+4
source share
1 answer

This error is caused by jsp: including a file that does not exist on the server. See question No. 5564 . Somehow, certain files that exist in my development environment do not load when deployed to Google App Engine ( Update:) , see also issue # 5565 ).

+2
source

All Articles