Glassfish Support - navigating directly to the 500 page throws a NullPointerException

XMLWordPrintable

      When deploying JIRA in Glassfish, navigating to the 500 page 500page.jsp results in the 500 page throwing a NullPointerException.

      Looking at the generated java code:

        public void _jspService(HttpServletRequest request, HttpServletResponse response)
              throws java.io.IOException, ServletException {
      
          PageContext pageContext = null;
          HttpSession session = null;
          Throwable exception = org.apache.jasper.runtime.JspRuntimeLibrary.getThrowable(request);
          response.setStatus(((Integer)request.getAttribute("javax.servlet.error.status_code")).intValue());
      
      

      ((Integer)request.getAttribute("javax.servlet.error.status_code")) is null.

      Tomcat's equiv code:

        public void _jspService(HttpServletRequest request, HttpServletResponse response)
              throws java.io.IOException, ServletException {
      
          JspFactory _jspxFactory = null;
          PageContext pageContext = null;
          HttpSession session = null;
          Throwable exception = org.apache.jasper.runtime.JspRuntimeLibrary.getThrowable(request);
          if (exception != null) {
            response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
          }
      

      It just sets it to 500.

      When the 500page is triggered in Glassfish, it works correctly.

      There is a discussion on this here.

            Assignee:
            Unassigned
            Reporter:
            Nick Menere [Atlassian] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: