Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-73444

NPE when changing portlet id to an unexisting one in URL parameters

    Details

      Description

      Steps to reproduce the problem:

      1. Issue a request in Liferay portal, for example: http://localhost:8080/web/guest/home
      2. Open the browser network console (dev tools) to find the Request URL to the ComboServlet
      3. Copy the Request URL on the browser search bar, change the portlet ID and press intro. For example, change from:

      http://localhost:8080/combo?browserId=other&minifierType=&themeId=classic_WAR_classictheme&languageId=en_US&b=7003&com_liferay_product_navigation_product_menu_web_portlet_ProductMenuPortlet:%2Fcss%2Fmain.css&t=1499174518000

      to:

      http://localhost:8080/combo?browserId=other&minifierType=&themeId=classic_WAR_classictheme&languageId=en_US&b=7003&[WHATEVER_UNEXISTING_PORTLET_ID]:%2Fcss%2Fmain.css&t=1499174518000

      Observed behaviour: Internal Server Error (500) will show up and a NPE in logs.

      12:20:07,397 ERROR [http-nio-8080-exec-5][ComboServlet:89] java.lang.NullPointerException
      java.lang.NullPointerException
       at com.liferay.portal.servlet.ComboServlet.getResourceRequestDispatcher(ComboServlet.java:389)
       at com.liferay.portal.servlet.ComboServlet.doService(ComboServlet.java:221)
       at com.liferay.portal.servlet.ComboServlet.service(ComboServlet.java:86)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
       at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
       at com.liferay.portal.servlet.filters.language.LanguageFilter.processFilter(LanguageFilter.java:82)
       at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
       at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
       at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:125)
       at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
       at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
       at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.java:428)
       at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
       at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
       at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:86)
       at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
       at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
       at com.liferay.portal.servlet.filters.header.HeaderFilter.processFilter(HeaderFilter.java:96)
       at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
       at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
       at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
       at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
       at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
       at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:265)
       at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
       at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
       at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
       at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
       at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
       at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
       at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
       at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:99)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
       at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
       at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
       at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
       at java.lang.Thread.run(Thread.java:748)

      Expected behaviour: Not found Error (404) and no exceptions.
       

        Attachments

          Activity

            People

            Assignee:
            hong.zhao Hong Zhao (Inactive)
            Reporter:
            cristina.rodriguez Cristina Rodriguez
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 6 weeks, 4 days ago

                Packages

                Version Package
                7.0.0 DXP FP23
                7.0.X EE
                7.0.4 CE GA5
                7.1.X
                Master