Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-13112

showServerConfig.jsp throw NullPointerException NPE when accessed using Site or LB URL

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 13.5.0, 13.5.1, 14.0.0, 14.1.1, 14.5.0, 5.5.1, 6.0.0
    • Fix Version/s: 13.5.3, 6.5.0, 14.1.2, 6.0.1, 5.5.2
    • Component/s: console
    • Labels:
    • Target Version/s:
    • Sprint:
      AM Sustaining Sprint 54, AM Sustaining Sprint 55
    • Story Points:
      1
    • Needs backport:
      No
    • Support Ticket IDs:
    • Needs QA verification:
      No
    • Functional tests:
      No
    • Are the reproduction steps defined?:
      Yes and I used the same an in the description

      Description

      Bug description

      When accessing showServerConfig.jsp with an Site LB (or any LB address) the response throw a NullPointerException.

      org.apache.jasper.JasperException: An exception occurred processing JSP page /showServerConfig.jsp at line 130
      127: </td>
      128: <td>
      129: <%
      130: out.println(ESAPI.encoder().encodeForHTML(prop.getProperty("com.iplanet.am.server.protocol").trim() + "://" +
      131: prop.getProperty("com.iplanet.am.server.host").trim() + ":" +
      132: prop.getProperty("com.iplanet.am.server.port").trim() +
      133: prop.getProperty("com.iplanet.am.services.deploymentDescriptor")));
      

      with exception

      java.lang.NullPointerException
      	org.apache.jsp.showServerConfig_jsp._jspService(showServerConfig_jsp.java:352)
      	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)
      	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
      	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:44)
      	com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:111)
      	org.forgerock.openam.audit.context.AuditContextFilter.doFilter(AuditContextFilter.java:51)
      

      This does not happen when the installed AM URL is used to access the page.

      How to reproduce the issue

      Details steps outlining how to recreate the issue (remove this text)

      1. Configure a site LB
      2. Access the siteLB for showServerConfig.jsp
      Expected behaviour
      No error (at most do not return anything)
      
      Current behaviour
      A not nice Exception page is seen
      

      Work around

      Access this using the true AM server address and not thru Site/LB URL

      The code did not find the server instance based on the accessed URL.

        Attachments

          Activity

            People

            • Assignee:
              chee-weng.chea C-Weng C
              Reporter:
              chee-weng.chea C-Weng C
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: