Uploaded image for project: 'PUBLIC - Liferay Portal Web Content Experience'
  1. PUBLIC - Liferay Portal Web Content Experience
  2. WCM-1379

Publish failed when staging site with Audience Targeting

    Details

      Description

      Steps of reproduction:

      1. Create a blank site and add a public page.
      2. Go to Staging to enable Local Live and select all items under Staged Content.
      3. Go to Configuration > Audience Targeting.
      4. Create a user segment named Male Users with Gender.
      5. Go to Web Content to add BasicWC and select Male Users under User Segment.
      6. Go to Configuration > Audience Targeting.
      7. Add new Campaign and select Male Users under User Segment.
      8. Go to the staging site and Publish to Live

      Actual Result:
      Fail to publish it, and error throws on console:

      07:58:02,326 WARN  [liferay/background_task-1][LayoutStagingBackgroundTaskExecutor:171] Unable to publish layout: com.liferay.asset.kernel.exception.DuplicateVocabularyException: A category vocabulary with the name User Segment already exists
      07:58:02,337 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:165] Unable to execute background task
      com.liferay.exportimport.kernel.lar.PortletDataException: com.liferay.asset.kernel.exception.DuplicateVocabularyException: A category vocabulary with the name User Segment already exists
          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:369)
          at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:355)
          at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.doImportReferenceStagedModel(StagedModelDataHandlerUtil.java:402)
          at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importReferenceStagedModel(StagedModelDataHandlerUtil.java:281)
          at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importReferenceStagedModels(BaseStagedModelDataHandler.java:831)
          at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:368)
          at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:369)
          at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:355)
          at com.liferay.content.targeting.internal.lar.ContentTargetingPortletDataHandler.doImportData(ContentTargetingPortletDataHandler.java:168)
          at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:382)
          at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:296)
          at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:834)
          at com.liferay.exportimport.controller.LayoutImportController.doImportFile(LayoutImportController.java:827)
          at com.liferay.exportimport.controller.LayoutImportController.importFile(LayoutImportController.java:225)
          at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:185)
          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:497)
          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.$Proxy107.importLayouts(Unknown Source)
          at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importLayouts(ExportImportLocalServiceUtil.java:202)
          at com.liferay.exportimport.background.task.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:273)
          at com.liferay.exportimport.background.task.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:246)
          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:139)
          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:124)
          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:745)
      Caused by: com.liferay.asset.kernel.exception.DuplicateVocabularyException: A category vocabulary with the name User Segment already exists
          at com.liferay.portlet.asset.service.impl.AssetVocabularyLocalServiceImpl.validate(AssetVocabularyLocalServiceImpl.java:497)
          at com.liferay.portlet.asset.service.impl.AssetVocabularyLocalServiceImpl.addVocabulary(AssetVocabularyLocalServiceImpl.java:104)
          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:497)
          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.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:51)
          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.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.$Proxy176.addVocabulary(Unknown Source)
          at com.liferay.content.targeting.util.UserSegmentUtil.addAssetVocabulary(UserSegmentUtil.java:64)
          at com.liferay.content.targeting.util.UserSegmentUtil.getAssetVocabularyId(UserSegmentUtil.java:111)
          at com.liferay.content.targeting.service.impl.UserSegmentLocalServiceImpl.updateUserSegmentCategory(UserSegmentLocalServiceImpl.java:586)
          at com.liferay.content.targeting.service.impl.UserSegmentLocalServiceImpl.updateUserSegment(UserSegmentLocalServiceImpl.java:426)
          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:497)
          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.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:51)
          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.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.$Proxy641.updateUserSegment(Unknown Source)
          at com.liferay.content.targeting.internal.lar.UserSegmentStagedModelDataHandler.importStagedModel(UserSegmentStagedModelDataHandler.java:137)
          ... 46 more
      

       
      Expected Result:
      Publish successful.

      Reproduced on:
      Tomcat 8.0.32 + MySQL 5.6. Portal ee-7.0.x GIT ID: 0c8d2663d7e51f9bd71907a094187884cbf4ada3.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                yvonne.han Yvonne Han
                Reporter:
                yvonne.han Yvonne Han
                Participants of an Issue:
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  2.1.1