PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-45576

Site pages can't be imported between environments if you are using the calendar portlet in some of them

    Details

    • Branch Version/s:
      6.2.x
    • Backported to Branch:
      Committed
    • Story Points:
      5
    • Fix Priority:
      4
    • Similar Issues:
      Show 5 results 

      Description

      Steps to reproduce: You need two differents environments (env1 and env2)

      env1:
      1. Deploy the Calendar portlet.
      2. Create an empty Site (site1) and add a page (home).
      3. Add the Calendar to the home.
      4. Go to Site Admin (site1) > Pages: export (with the default options). Downloar de lar file.

      env2:
      5. Deploy the Calendar portlet.
      6. Go to Control Panel > Sites: add a new empty site (site2)
      7. Go to Site Admin (site2) > Pages: import the downloaded lar in the step4 (default options)

      Result
      GUI: Failed message (see attached import-error.png)
      Logs:

      06:33:36,610 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:137] Unable to execute background task
      com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portal.NoSuchGroupException: No Group exists with the primary key 10354
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:236)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
              at $Proxy436.importStagedModel(Unknown Source)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:299)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:289)
              at com.liferay.calendar.lar.CalendarPortletDataHandler.doImportData(CalendarPortletDataHandler.java:156)
              at com.liferay.portal.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:379)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
              at $Proxy435.importData(Unknown Source)
              at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:175)
              at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:645)
              at com.liferay.portal.lar.LayoutImporter.doImportLayouts(LayoutImporter.java:628)
              at com.liferay.portal.lar.LayoutImporter.importLayouts(LayoutImporter.java:115)
              at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1834)
              at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1883)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
              at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:183)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:140)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at $Proxy63.importLayouts(Unknown Source)
              at com.liferay.portal.service.LayoutLocalServiceUtil.importLayouts(LayoutLocalServiceUtil.java:1315)
              at com.liferay.portal.lar.backgroundtask.LayoutImportBackgroundTaskExecutor.execute(LayoutImportBackgroundTaskExecutor.java:61)
              at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:56)
              at com.liferay.portal.backgroundtask.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:111)
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
              at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
              at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:71)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: com.liferay.portal.NoSuchGroupException: No Group exists with the primary key 10354
              at com.liferay.portal.service.persistence.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:7956)
              at com.liferay.portal.service.persistence.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:7974)
              at com.liferay.portal.service.impl.GroupLocalServiceImpl.getGroup(GroupLocalServiceImpl.java:1213)
              at sun.reflect.GeneratedMethodAccessor524.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at $Proxy37.getGroup(Unknown Source)
              at com.liferay.portal.service.GroupLocalServiceUtil.getGroup(GroupLocalServiceUtil.java:216)
              at com.liferay.calendar.lar.CalendarStagedModelDataHandler.getCalendarNameMap(CalendarStagedModelDataHandler.java:154)
              at com.liferay.calendar.lar.CalendarStagedModelDataHandler.doImportStagedModel(CalendarStagedModelDataHandler.java:105)
              at com.liferay.calendar.lar.CalendarStagedModelDataHandler.doImportStagedModel(CalendarStagedModelDataHandler.java:1)
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:224)
              ... 64 more
      

      Expected

      GUI: Successful, and Site 2 has the home page with the Calendar Portlet

      1. 45576_master_bug.png
        19 kB
      2. 45576_master_fix.png
        13 kB
      3. import-error.png
        50 kB

        Issue Links

          Activity

          Hide
          Jose Jimenez added a comment -

          Workaround-> Import the pages without calendar data, unselecting Calendar from the import options.

          Show
          Jose Jimenez added a comment - Workaround-> Import the pages without calendar data, unselecting Calendar from the import options.
          Hide
          Haoliang "Lyon" Wu added a comment - - edited

          PASSED Manual Testing following the steps in description.

          Reproduced on:
          Tomcat 7.0.42 + MySQL 5.5.21 Portal master GIT ID: 5c3a2672a588831de6db557b20555925939f19a5.
          Plugins master GIT ID: ffcb534046cd3f526bb6a3a5333e8530f1b1990c.

          The lar file import is failed with console throwing an exception like this:

          07:32:39,096 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:137] Unable to execute background task
          com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portal.NoSuchGroupException: No Group exists with the pr
          imary key 10504
                  at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:23
          6)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          The page error information is like screenshot:

          Fixed on:
          Tomcat 7.0.42 + MySQL 5.5.21 Portal master GIT ID: 5c3a2672a588831de6db557b20555925939f19a5 .
          Plugins master GIT ID: 7c8bdbf1df9d38215f0d595a0a04521b62afb2ad.
          Tomcat 7.0.42 + MySQL 5.5.21 Portal ee-6.2.x GIT ID: 8f076c8268c83c196e61837626ac9c1d2f0c9c4c.

          The lar file import is successful. The console throws no exceptions.

          Note: The ee-6.2.x plugins version is ee-6.2.10.

          Show
          Haoliang "Lyon" Wu added a comment - - edited PASSED Manual Testing following the steps in description. Reproduced on: Tomcat 7.0.42 + MySQL 5.5.21 Portal master GIT ID: 5c3a2672a588831de6db557b20555925939f19a5. Plugins master GIT ID: ffcb534046cd3f526bb6a3a5333e8530f1b1990c. The lar file import is failed with console throwing an exception like this: 07:32:39,096 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:137] Unable to execute background task com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portal.NoSuchGroupException: No Group exists with the pr imary key 10504 at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:23 6) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) The page error information is like screenshot: Fixed on: Tomcat 7.0.42 + MySQL 5.5.21 Portal master GIT ID: 5c3a2672a588831de6db557b20555925939f19a5 . Plugins master GIT ID: 7c8bdbf1df9d38215f0d595a0a04521b62afb2ad. Tomcat 7.0.42 + MySQL 5.5.21 Portal ee-6.2.x GIT ID: 8f076c8268c83c196e61837626ac9c1d2f0c9c4c. The lar file import is successful. The console throws no exceptions. Note: The ee-6.2.x plugins version is ee-6.2.10.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                51 weeks, 3 days ago

                Development

                  Structure Helper Panel