2 Replies Latest reply on Nov 6, 2017 1:38 PM by lukaszracon

    UT005023: Exception handling request to /error/error.jsp: java.lang.RuntimeException

    Kumar Saurav Newbie

      Hi,

       

      We are migrating our application from jboss-eap-6.4 to jboss-eap-7.0 and seeing lots of exceptions in the logs related to redirects to the error page.

      We have custom error pages configured in our web.xml file for different error codes such as 404, 500 etc.

       

      Whenever there is any 404 error we are seeing in the logs error such as :

       

      2017-11-06 04:28:26,376 286950 ERROR [io.undertow.request] (default task-3:) UT005023: Exception handling request to /error/error404meta.jsp: java.lang.RuntimeException: org.apache.jasper.JasperException: java.lang.NullPointerException

      at io.undertow.servlet.spec.HttpServletResponseImpl.doErrorDispatch(HttpServletResponseImpl.java:158)

      at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:288)

      at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:264)

      at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)

      at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:175)

      at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)

      at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:792)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      at java.lang.Thread.run(Thread.java:745)

      Caused by: org.apache.jasper.JasperException: java.lang.NullPointerException

      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:473)

      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:402)

      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:346)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

      at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)

       

       

      Mapping in the web.xml is like:

       

      <error-page>

      <error-code>404</error-code>

      <location>/error/error404meta.jsp</location>

      </error-page>

       

      jboss-web.xml has an entry like:

       

      <jboss-web>

      <context-root>/</context-root>

      </jboss-web>

       

      and the entry for standalone.xml for undertow subsystem is :

       

      <subsystem xmlns="urn:jboss:domain:undertow:3.1">

                  <buffer-cache name="default"/>

                  <server name="default-server">

                      <ajp-listener name="ajp" socket-binding="ajp"/>

                      <http-listener name="default" socket-binding="http" redirect-socket="https"/>

                      <host name="default-host" alias="localhost">

                          <location name="/" handler="welcome-content"/>

                          <filter-ref name="server-header" predicate="true"/>

                          <filter-ref name="x-powered-by-header" predicate="true"/>

                          <filter-ref name="404-handler" predicate="true"/>

                      </host>

                  </server>

                  <servlet-container name="default">

                      <jsp-config/>

                      <websockets/>

                  </servlet-container>

                  <handlers>

                      <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>

                  </handlers>

                  <filters>

                      <response-header name="server-header" header-name="Server" header-value="WildFly/10"/>

                      <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>

                     <error-page name="404-handler" code="404" path="${jboss.home.dir}/welcome-content/ErrorPage.html"/>

                  </filters>

              </subsystem>

       

      Error page handler with or without doesn't have any effects in terms of error that we are facing.

       

      Any help would be appreciated.

       

      Thanks