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

NullPointerException triggered when trying to access the main page of a site which has no pages

    Description

    Current issue: NullPointerException triggered when trying to access the main page of a site which has no pages

    Steps to reproduce:

    1. Go to CP > Sites > Site > Create a blank site called Site Name
    2. Try to access <server_adrress>/group/site-name

    Actual result: NullPointerException is triggered

     

    <log4j:event logger="com.liferay.portal.servlet.filters.i18n.I18nFilter" timestamp="1585236436385" level="ERROR" thread="http-nio-7300-exec-6">
    <log4j:message><![CDATA[java.lang.NullPointerException]]></log4j:message>
    <log4j:throwable><![CDATA[java.lang.NullPointerException
    	at com.liferay.friendly.url.internal.servlet.FriendlyURLServlet._normalizeFriendlyURL(FriendlyURLServlet.java:672)
    	at com.liferay.friendly.url.internal.servlet.FriendlyURLServlet.getRedirect(FriendlyURLServlet.java:290)
    	at com.liferay.friendly.url.internal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:373)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    	at com.liferay.portal.servlet.ServletAdapter.service(ServletAdapter.java:99)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124)
    	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
    	at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:368)
    	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    	at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
    	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    	at com.liferay.portal.servlet.filters.lockout.LockoutFilter.processFilter(LockoutFilter.java:58)
    	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
    	at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)
    	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
    	at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:87)
    	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
    	at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:264)
    	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
    	at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
    	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
    	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:250)
    	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
    	at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:183)
    	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
    	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:389)
    	at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
    	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
    	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
    	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
    	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
    	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594)
    	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at org.apache.tomcat.util.threads.TaskThrea
    

     

    Expected result: A friendly message should be displayed such as:

    The requested resource could not be found.
    http://192.168.109.41:7300/group/site-name
    

    This issue is not seen on 7.2.x. A friendly message is displayed there.

    Environment:
    master DXP: e4a8566ba9add6f6093029581845d16c831b6934
    Updated on: Wed Mar 25 15:32:03 2020 -0700

     

      Attachments

      1. 7.2.x.png
        7.2.x.png
        226 kB
      2. LPS-110947.gif
        LPS-110947.gif
        1.02 MB

        Issue Links

          Activity

            People

            Assignee:
            yang.cao Yang Cao
            Reporter:
            dennys.barros Dennys Barros (Inactive)
            Participants of an Issue:
            Recent user:
            Jason Pince
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              34 weeks, 2 days ago

                Packages

                Version Package
                7.3.10 DXP GA1
                Master