java.lang.StackOverflowError when a JSP request hits an exception

Solution Verified - Updated -

Issue

  • When accessing a JSP, it fails in a StackOverflow. The stack trace provided with the exception shows deep recursion in a couple of points:
ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/workbench].[jsp]] (http-0.0.0.0-8080-1) Servlet.service() for servlet jsp threw exception
java.lang.StackOverflowError
    at org.apache.catalina.connector.RequestFacade.getAttribute(RequestFacade.java:258)
    at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
    at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
    at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
    at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
    at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:222)
        ...
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)
    at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696)
    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667)
    at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:808)
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
    at org.apache.jsp.WEB_002dINF.pages.common.globalError_jsp._jspService(globalError_jsp.java:590)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)
    at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696)
    at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667)
    at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:808)
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
    at org.apache.jsp.WEB_002dINF.pages.common.globalError_jsp._jspService(globalError_jsp.java:590)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Environment

  • JBoss Enterprise Application Platform (EAP)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In