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

UnsupportedOperation when Publishing a User Segment referencing a User Group

    Details

      Description

      Steps to Reproduce:

      1. Add a User Group with a user.
      2. Add a new site named: "Site Name".
      3. Add a public page: "Test Page Name".
      4. Enable Local Staging (make sure Audience targeting is staged.)
      5. Go to Configuration -> Audience Targeting.
      6. Add Use Segment with User Group Member rule, select the created User Group.
      7. Navigate to the page named 'Test Page Name'.
      8. Publish to live.

      Expected Results:
      Publish successfully.

      Actual Results:
      Publish failed with UnsupportedOperationException.

      2018-01-29 10:22:49.907 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:166] Unable to execute background task
      com.liferay.exportimport.kernel.lar.PortletDataException: com.liferay.exportimport.kernel.lar.PortletDataException: java.lang.UnsupportedOperationException
      	at com.liferay.content.targeting.internal.lar.UserSegmentStagedModelDataHandler.importStagedModel(UserSegmentStagedModelDataHandler.java:156)
      	at com.liferay.content.targeting.internal.lar.UserSegmentStagedModelDataHandler.importStagedModel(UserSegmentStagedModelDataHandler.java:48)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:373)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:359)
      	at com.liferay.content.targeting.internal.lar.ContentTargetingPortletDataHandler.doImportData(ContentTargetingPortletDataHandler.java:154)
      	at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:391)
      	at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:297)
      	at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:835)
      	at com.liferay.exportimport.controller.LayoutImportController.doImportFile(LayoutImportController.java:828)
      	at com.liferay.exportimport.controller.LayoutImportController.importFile(LayoutImportController.java:226)
      	at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:206)
      	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:163)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:169)
      	at com.sun.proxy.$Proxy108.importLayouts(Unknown Source)
      	at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importLayouts(ExportImportLocalServiceUtil.java:113)
      	at com.liferay.exportimport.background.task.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:277)
      	at com.liferay.exportimport.background.task.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:250)
      	at com.liferay.portal.spring.transaction.TransactionInvokerImpl$CallableMethodInvocation.proceed(TransactionInvokerImpl.java:101)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
      	at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:47)
      	at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
      	at com.liferay.exportimport.background.task.LayoutStagingBackgroundTaskExecutor.execute(LayoutStagingBackgroundTaskExecutor.java:143)
      	at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:54)
      	at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:43)
      	at com.liferay.portal.kernel.backgroundtask.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:56)
      	at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:125)
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
      	at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: com.liferay.exportimport.kernel.lar.PortletDataException: java.lang.UnsupportedOperationException
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importMissingReference(BaseStagedModelDataHandler.java:331)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.doImportMissingReference(BaseStagedModelDataHandler.java:508)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importMissingReference(BaseStagedModelDataHandler.java:305)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.doImportReferenceStagedModel(StagedModelDataHandlerUtil.java:400)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importReferenceStagedModel(StagedModelDataHandlerUtil.java:285)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importReferenceStagedModels(BaseStagedModelDataHandler.java:844)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:371)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:373)
      	at com.liferay.content.targeting.internal.lar.UserSegmentStagedModelDataHandler.importRuleInstances(UserSegmentStagedModelDataHandler.java:437)
      	at com.liferay.content.targeting.internal.lar.UserSegmentStagedModelDataHandler.importStagedModel(UserSegmentStagedModelDataHandler.java:149)
      	... 40 more
      Caused by: java.lang.UnsupportedOperationException
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.doImportMissingReference(BaseStagedModelDataHandler.java:516)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importMissingReference(BaseStagedModelDataHandler.java:324)
      	... 49 more
      
      

        Attachments

          Activity

            People

            Assignee:
            jeremy.chen Jeremy Chen
            Reporter:
            joshua.cords Joshua Cords
            Participants of an Issue:
            Recent user:
            Joel Garman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 44 weeks, 4 days ago

                Packages

                Version Package
                7.0.0 DXP FP82
                7.0.10.12 DXP SP12
                7.0.X
                7.1.3 CE GA4
                7.1.10 DXP FP11
                7.1.X
                Master