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

StringIndexOutOfBoundException when reaching the portal using a context other than ROOT

    Details

      Description

      Description
      When the portal is deployed to a context other than ROOT, the page cannot be loaded - instead a blank page appears with a StringIndexOutOfBoundException in the log.

      Reproduction
      1. Install liferay-fix-pack-platform-22-6210
      2. Configure Tomcat to deploy the portal to a context other than the ROOT, e.g.: lportal
      3. Startup Tomcat
      4. Reach Liferay from the browser: http://localhost:8080/lportal

      Issue: A blank page appears and the following stack trace can be seen in the log:

      ava.lang.StringIndexOutOfBoundsException: String index out of range: -2
      	at java.lang.String.substring(String.java:1875)
      	at com.liferay.portal.servlet.FriendlyURLServlet.getPathInfo(FriendlyURLServlet.java:162)
      	at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:93)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:73)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
      	at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:358)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
      	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:109)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:117)
      	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
      	at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
      	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:109)
      

        Attachments

          Activity

            People

            Assignee:
            david.zhang David Zhang (Inactive)
            Reporter:
            zalan.szakolci Zalán Szakolci
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

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

                Packages

                Version Package
                7.0.0 M3