Description

    Steps to reprodece:

    1. Add a new site named: "Site Name"
    2. Go to Configuration -> Audience Targetinig
    3. Add Use Segment
    4. Type name "Test Use Segment" and then save.
    5. Go to Publishing -> Export
    6. Click "+" and then "Choose Content"
    7. Checked "Audience Targeting" -> Export
    8. Download the lar file.
    9. Create a new site named "Import Site"
    10. Import the lar file from step 8. 

    Expect Result:

    Import successfully.

    Actual Result:

    Import failed and console throw errors: 

    05:33:08,711 WARN [liferay/background_task-1][LayoutImportBackgroundTaskExecutor:93] Unable to import layouts: java.lang.NullPointerException
     05:33:08,727 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:165] Unable to execute background task
     com.liferay.exportimport.kernel.lar.PortletDataException: java.lang.NullPointerException
     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.content.targeting.internal.lar.ContentTargetingPortletDataHandler.doImportData(ContentTargetingPortletDataHandler.java:154)
     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: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.$Proxy106.importLayouts(Unknown Source)
     at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importLayouts(ExportImportLocalServiceUtil.java:202)
     at com.liferay.exportimport.background.task.LayoutImportBackgroundTaskExecutor$LayoutImportCallable.call(LayoutImportBackgroundTaskExecutor.java:123)
     at com.liferay.exportimport.background.task.LayoutImportBackgroundTaskExecutor$LayoutImportCallable.call(LayoutImportBackgroundTaskExecutor.java:109)
     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.LayoutImportBackgroundTaskExecutor.execute(LayoutImportBackgroundTaskExecutor.java:84)
     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:748)
     Caused by: java.lang.NullPointerException
     at com.liferay.portal.kernel.util.ParamUtil.getString(ParamUtil.java:2243)
     at com.liferay.portal.util.LocalizationImpl.getLocalizationMap(LocalizationImpl.java:399)
     at com.liferay.portal.kernel.util.LocalizationUtil.getLocalizationMap(LocalizationUtil.java:132)
     at com.liferay.commerce.product.asset.categories.web.service.impl.CPAssetCategoryLocalServiceImpl.updateCategory(CPAssetCategoryLocalServiceImpl.java:98)
     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.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
     at com.sun.proxy.$Proxy510.updateCategory(Unknown Source)
     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.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.$Proxy88.updateCategory(Unknown Source)
     at com.liferay.content.targeting.internal.lar.UserSegmentStagedModelDataHandler.importAssetCategory(UserSegmentStagedModelDataHandler.java:344)
     at com.liferay.content.targeting.internal.lar.UserSegmentStagedModelDataHandler.importStagedModel(UserSegmentStagedModelDataHandler.java:102)
     ... 40 more

    Reproduced on:

    Tomcat 8.0.32 + MySQL 5.7. Portal ee-7.0.x GIT ID: 48db1a2f4460b8f3f38078bf3674907cace7b420.

      Attachments

        Issue Links

          Activity

            People

            Assignee:
            yunlin.sun Yunlin "Steven" Sun
            Reporter:
            yunlin.sun Yunlin "Steven" Sun
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package