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

Incorrect js module paths when the property portal.proxy.path is set

    Details

      Description

      Reproduction steps

      1. Install apache2
      2. Activate http proxy module:'sudo a2enmod proxy_http'
      3. Edit file '/etc/apache2/sites-enabled/default.conf' and leave it like (considering you will run tomcat on port 8080):
      <VirtualHost *:80>
          <Proxy *>
              AddDefaultCharSet Off
              Order deny,allow
              Allow from all
          </Proxy>
          ProxyPreserveHost On
          ProxyPass /lfr http://localhost:8080
          ProxyPassReverse /lfr http://localhost:8080
      </VirtualHost>
      
      
      1. Restart apache:'sudo service apache2 restart'
      2. Set up a Liferay bundle
      3. Set the following property in portal-ext.properties:'portal.proxy.path=/lfr'
      4. Start up tomcat
      5. Access: 'http://localhost/lfr'

      Expected behavior

      Liferay can be accessed without errors

      Actual behavior

      Errors shown in console like:

      GET http://localhost/lfr/combo/?browserId=other&minifierType=&languageId=en_US&b=7100&t=1538572913973&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-dom@2.16.5/lib/features.js<REDACTED> net::ERR_ABORTED 500

      Errors shown in liferay log:

      2018-10-03 14:12:24.483 ERROR [http-nio-8080-exec-5][error_jsp:?] Current URL /lfr/combo/?browserId=other&minifierType=&languageId=en_US&b=7100&t=1538572913973&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.5/lib/html/unescape.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.5/lib/html/HTML2IncDom.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$incremental-dom@0.5.1/dist/incremental-dom-cjs.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$incremental-dom-string@0.0.2/dist/incremental-dom-string.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.5/lib/incremental-dom.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.5/lib/data.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.5/lib/changes.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.5/lib/callArgs.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.5/lib/incremental-dom-aop.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.5/lib/children/children.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.5/lib/render/attributes.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.5/lib/cleanup/unused.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.5/lib/render/render.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.5/lib/render/patch.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.5/lib/IncrementalDomRenderer.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-incremental-dom@2.16.5/lib/all/incremental-dom.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-soy-bundle@2.16.5/lib/bundle.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-soy@2.16.5/lib/SoyAop.js&/lfr/lfr/o/js/resolved-module/frontend-js-metal-web$metal-soy@2.16.5/lib/Soy.js
      2018-10-03 14:12:24.483 ERROR [http-nio-8080-exec-5][error_jsp:?] Referer http://localhost/lfr
      2018-10-03 14:12:24.483 ERROR [http-nio-8080-exec-5][error_jsp:?] Remote address 127.0.0.1
      2018-10-03 14:12:24.483 ERROR [http-nio-8080-exec-5][error_jsp:?] java.lang.NullPointerException
      java.lang.NullPointerException
          at com.liferay.portal.template.AbstractSingleResourceTemplate.cacheTemplateResource(AbstractSingleResourceTemplate.java:112)
          at com.liferay.portal.template.AbstractSingleResourceTemplate.<init>(AbstractSingleResourceTemplate.java:57)
          at com.liferay.portal.template.freemarker.internal.FreeMarkerTemplate.<init>(FreeMarkerTemplate.java:62)
          at com.liferay.portal.template.freemarker.internal.FreeMarkerManager.doGetTemplate(FreeMarkerManager.java:361)
          at com.liferay.portal.template.BaseSingleTemplateManager.getTemplate(BaseSingleTemplateManager.java:56)
          at com.liferay.portal.template.BaseSingleTemplateManager.getTemplate(BaseSingleTemplateManager.java:48)
          at com.liferay.portal.kernel.template.TemplateManagerUtil._getTemplate(TemplateManagerUtil.java:204)
          at com.liferay.portal.kernel.template.TemplateManagerUtil.getTemplate(TemplateManagerUtil.java:80)
          at com.liferay.taglib.util.ThemeUtil.doIncludeFTL(ThemeUtil.java:235)
          at com.liferay.taglib.util.ThemeUtil.doDispatch(ThemeUtil.java:158)
          at com.liferay.taglib.util.ThemeUtil.includeFTL(ThemeUtil.java:97)
          at com.liferay.taglib.util.ThemeUtil.include(ThemeUtil.java:82)
          at com.liferay.taglib.theme.IncludeTag.doEndTag(IncludeTag.java:34)
          at org.apache.jsp.html.common.themes.portal_jsp._jspx_meth_liferay_002dtheme_005finclude_005f1(Unknown Source)
          at org.apache.jsp.html.common.themes.portal_jsp._jspService(Unknown Source)
          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
          at com.liferay.portal.servlet.DirectRequestDispatcher.forward(DirectRequestDispatcher.java:49)
          at com.liferay.portal.servlet.DirectRequestDispatcherFactoryImpl$IndirectRequestDispatcher.forward(DirectRequestDispatcherFactoryImpl.java:164)
          at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:81)
          at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.forward(ClassLoaderRequestDispatcherWrapper.java:45)
          at com.liferay.portal.struts.StrutsUtil.forward(StrutsUtil.java:73)
          at com.liferay.portal.struts.PortalRequestProcessor.doForward(PortalRequestProcessor.java:276)
          at com.liferay.portal.struts.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:62)
          at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:566)
          at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:212)
          at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:167)
          at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
          at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
          at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:590)
          at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:567)
          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:119)
          at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
          at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:103)
          at com.liferay.portal.apio.internal.architect.servlet.filter.APIDocumentationFilter.processFilter(APIDocumentationFilter.java:74)
          at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
          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:144)
          at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.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:207)
          at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
          at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
          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:207)
          at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
          at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
          at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:181)
          at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
          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.InvokerFilter.doFilter(InvokerFilter.java:101)
          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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
          at com.liferay.portal.util.PortalImpl.sendError(PortalImpl.java:6929)
          at com.liferay.portal.kernel.util.PortalUtil.sendError(PortalUtil.java:2326)
          at com.liferay.portal.servlet.ComboServlet.service(ComboServlet.java:92)
          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:119)
          at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
          at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:103)
          at com.liferay.portal.apio.internal.architect.servlet.filter.APIDocumentationFilter.processFilter(APIDocumentationFilter.java:74)
          at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
          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:144)
          at com.liferay.portal.servlet.filters.language.LanguageFilter.processFilter(LanguageFilter.java:82)
          at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
          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.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:57)
          at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
          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:144)
          at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.java:438)
          at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
          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:144)
          at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:83)
          at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
          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:144)
          at com.liferay.portal.servlet.filters.header.HeaderFilter.processFilter(HeaderFilter.java:95)
          at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
          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:144)
          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:207)
          at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
          at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
          at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:263)
          at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
          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 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:101)
          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:199)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491)
          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:87)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
          at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
          at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
          at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764)
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388)
          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.TaskThread$WrappingRunnable.run(TaskThread.java:61)
          at java.lang.Thread.run(Thread.java:748)

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              raven.song Raven Song
              Reporter:
              javier.moral Javier Moral
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 1 week, 6 days ago

                  Packages

                  Version Package
                  7.1.10 DXP FP3
                  7.1.1 CE GA2
                  7.1.10.1 SP1
                  7.1.X
                  Master