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

NPE in a site created based on a site template after enabling propagation of changes and there are new pages which have the same name

    Details

      Description

      Steps to reproduce:

      1. Create a site template ST1
      2. Create a site S1 based on ST1 without enabling propagation of changes
      3. Add a page P1 to ST1
      4. Add a Web Content Display Portlet to page P1
      5. Add a Web Content STWC to that portlet
      6. Add a page P1 to S1
      7. Add a Web Content Display Portlet to page P1
      8. Add a Web Content SWC to that portlet
      9. Enable propagation of changes in site S1

      Actual result:

      • An error message appears:
        09:05:42,157 ERROR [http-apr-8080-exec-10][SitesImpl:1395] com.liferay.portal.kernel.exception.SystemException: java.lang.NullPointerException
        com.liferay.portal.kernel.exception.SystemException: java.lang.NullPointerException
                at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:200)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
                at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
                at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
                at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
                at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
                at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
                at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
                at com.sun.proxy.$Proxy157.importLayouts(Unknown Source)
                at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importLayouts(ExportImportLocalServiceUtil.java:202)
                at com.liferay.portlet.sites.util.SitesImpl.importLayoutSetPrototype(SitesImpl.java:1961)
                at com.liferay.portlet.sites.util.SitesImpl.mergeLayoutSetPrototypeLayouts(SitesImpl.java:1390)
                at com.liferay.sites.kernel.util.SitesUtil.mergeLayoutSetPrototypeLayouts(SitesUtil.java:277)
                at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.mergeLayoutSetPrototypeLayouts(LayoutLocalServiceVirtualLayoutsAdvice.java:290)
                at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:132)
                at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
                at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:177)
                at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
                at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
                at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
                at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
                at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
                at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
                at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
                at com.sun.proxy.$Proxy84.getLayouts(Unknown Source)
                at com.liferay.portal.kernel.service.LayoutLocalServiceUtil.getLayouts(LayoutLocalServiceUtil.java:1227)
                at com.liferay.portal.events.ServicePreAction.initThemeDisplay(ServicePreAction.java:402)
                at com.liferay.portal.events.ServicePreAction.servicePre(ServicePreAction.java:1830)
                at com.liferay.portal.events.ServicePreAction.run(ServicePreAction.java:1057)
                at com.liferay.portal.kernel.events.Action.processLifecycleEvent(Action.java:34)
                at com.liferay.portal.events.EventsProcessorUtil._process(EventsProcessorUtil.java:128)
                at com.liferay.portal.events.EventsProcessorUtil.process(EventsProcessorUtil.java:60)
                at com.liferay.portal.servlet.MainServlet.processServicePre(MainServlet.java:1173)
                at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:509)
                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.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:180)
                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.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:93)
                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.secure.SecureFilter.processFilter(SecureFilter.java:307)
                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.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
                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.InvokerFilter.doFilter(InvokerFilter.java:115)
                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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:720)
                at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:466)
                at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:391)
                at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)
                at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:172)
                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.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:180)
                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 com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
                at com.liferay.portal.security.sso.ntlm.internal.servlet.filter.NtlmPostFilter.processFilter(NtlmPostFilter.java:107)
                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.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:93)
                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.strip.StripFilter.processFilter(StripFilter.java:336)
                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.secure.SecureFilter.processFilter(SecureFilter.java:307)
                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.i18n.I18nFilter.processFilter(I18nFilter.java:269)
                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.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
                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.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:268)
                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:260)
                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 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:115)
                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.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2500)
                at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2489)
                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:745)
        Caused by: java.lang.NullPointerException
                at com.liferay.journal.content.web.exportimport.portlet.preferences.processor.JournalContentExportImportPortletPreferencesProcessor.processImportPortletPreferences(JournalContentExportImportPortletPreferencesProcessor.java:255)
                at com.liferay.exportimport.controller.PortletImportController.importPortletPreferences(PortletImportController.java:947)
                at com.liferay.exportimport.controller.LayoutImportController.doImportFile(LayoutImportController.java:777)
                at com.liferay.exportimport.controller.LayoutImportController.importFile(LayoutImportController.java:220)
                at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:185)
                ... 178 more
        
        

      Expected result:

      • No errors appear in logs. In S1 > Configuration > Site Settings > Pages a warning message shows the pages with conflicts in their URLs.

        Attachments

        1. fixed.png
          fixed.png
          197 kB
        2. reproduced.png
          reproduced.png
          128 kB

          Activity

            People

            • Assignee:
              hong.zhao Hong Zhao
              Reporter:
              daniel.couso Daniel Couso
              Participants of an Issue:
              Recent user:
              Jason Pince
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 14 weeks, 2 days ago

                Packages

                Version Package
                7.0.1 CE GA2