Details

      Description

      When attempting to import a site LAR which references an AssetEntryReferencedStagedModel object, the import fails.  This is because during import, we attempt to set the classNameId property on the AssetEntryReferencedStagedModel bean, however we do not have getters/setters for this model.

      Steps to reproduce:

      (You can also skip to step 6 and use the attached LAR file)

      1. Create a new site
      2. Add a page
      3. Add a content
      4. Add a user segment and reference the content (the rule doesn't really matter)
      5. Export the site and all content
      6. Create a new site
      7. Attempt to import LAR into new site

      Expected Results: Site LAR is imported
      Actual Results: The following error is thrown: 

      19:10:24,213 ERROR [liferay/background_task-1][BeanPropertiesImpl:662] jodd.bean.BeanException: Simple property not found: classNameId. Invalid property: AssetEntryReferencedStagedModel#classNameId (AssetEntryReferencedStagedModel#classNameId, forced=false)
      jodd.bean.BeanException: Simple property not found: classNameId. Invalid property: AssetEntryReferencedStagedModel#classNameId (AssetEntryReferencedStagedModel#classNameId, forced=false)
      	at jodd.bean.BeanUtilBean.setSimpleProperty(BeanUtilBean.java:186)
      	at jodd.bean.BeanUtilBean.setIndexProperty(BeanUtilBean.java:350)
      	at jodd.bean.BeanUtilBean.setProperty(BeanUtilBean.java:417)
      	at jodd.bean.BeanUtil.setProperty(BeanUtil.java:51)
      	at com.liferay.portal.bean.BeanPropertiesImpl.setProperty(BeanPropertiesImpl.java:659)
      	at com.liferay.portal.kernel.bean.BeanPropertiesUtil.setProperty(BeanPropertiesUtil.java:257)
      	at com.liferay.exportimport.lar.PortletDataContextImpl.getZipEntryAsObject(PortletDataContextImpl.java:1303)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil._getReferenceStagedModel(StagedModelDataHandlerUtil.java:420)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil._getStagedModel(StagedModelDataHandlerUtil.java:441)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:357)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importReferenceStagedModels(StagedModelDataHandlerUtil.java:330)
      	at com.liferay.content.targeting.display.web.internal.lar.BaseContentTargetingDisplayPortletDataHandler.updateImportAssetEntryIds(BaseContentTargetingDisplayPortletDataHandler.java:198)
      	at com.liferay.content.targeting.display.web.internal.lar.BaseContentTargetingDisplayPortletDataHandler.updateImportPortletPreferences(BaseContentTargetingDisplayPortletDataHandler.java:257)
      	at com.liferay.content.targeting.display.web.internal.lar.BaseContentTargetingDisplayPortletDataHandler.doProcessImportPortletPreferences(BaseContentTargetingDisplayPortletDataHandler.java:73)
      	at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.processImportPortletPreferences(BasePortletDataHandler.java:505)
      	at com.liferay.exportimport.controller.PortletImportController.importPortletPreferences(PortletImportController.java:1022)
      	at com.liferay.exportimport.controller.LayoutImportController.doImportFile(LayoutImportController.java:810)
      	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.RetryAdvice.invoke(RetryAdvice.java:46)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:39)
      	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.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.cache.thread.local.ThreadLocalCacheAdvice.invoke(ThreadLocalCacheAdvice.java:48)
      	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.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.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.$Proxy94.importLayouts(Unknown Source)
      	at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importLayouts(ExportImportLocalServiceUtil.java:100)
      	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)

       

      Reproduced in content-targeting "develop" branch (with DE-44): ba77cdce95dea60de4730d56442e6b6cdbc9562c

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: