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

Fail to import the deletion to Custom Filed

Details

    • 1
    • 3
    • Regression Bug

    Description

      Steps to reproduce:

      1. Enable Remote Staging with two bundles.
      2. Navigate to Control Panel > Configuration > Custom Fields > Document
      3. Add new custom field for Document
      4. Add new file entry and fill the custom field for that file entry
      5. Export Custom Fields portlet on staging server, then import it to the remote live
      6. Publish to Remote Live
      7. Assert document in live contains the custom field value
      8. Go back to staged site
      9. Delete the custom field you created in step 3
      10. Assert document does not have the custom field value
      11. Export Custom Fields portlet on staging server with deletions included.
      12. Import the previous lar to the remote live with the deletions included

      Expected result: The import process should be successful without errors.

      Actual result: The import process is failed with the following errors:

      2021-12-11 04:33:51.744 ERROR [liferay/background_task-6][LoggerExportImportLifecycleListener:272] Portlet import failed for portlet com_liferay_expando_web_portlet_ExpandoPortlet
      com.liferay.exportimport.kernel.lar.PortletDataException: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portlet.expando.model.impl.ExpandoRowImpl#42485]
      	at com.liferay.exportimport.kernel.lar.BasePortletDataHandler._handleException(BasePortletDataHandler.java:812) ~[portal-kernel.jar:?]
      	at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:396) ~[portal-kernel.jar:?]
      	at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importPortletData(PortletImportControllerImpl.java:422) ~[?:?]
      	at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importPortletData(PortletImportControllerImpl.java:353) ~[?:?]
      	at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.doImportPortletInfo(PortletImportControllerImpl.java:1066) ~[?:?]
      	at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importFile(PortletImportControllerImpl.java:304) ~[?:?]
      	at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importPortletInfo(ExportImportLocalServiceImpl.java:445) ~[portal-impl.jar:?]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57) ~[portal-impl.jar:?]
      	at com.liferay.change.tracking.internal.aop.CTTransactionAdvice.invoke(CTTransactionAdvice.java:80) ~[?:?]
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49) ~[portal-impl.jar:?]
      	at com.sun.proxy.$Proxy88.importPortletInfo(Unknown Source) ~[?:?]
      	at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importPortletInfo(ExportImportLocalServiceUtil.java:195) ~[portal-kernel.jar:?]
      	at com.liferay.exportimport.internal.background.task.PortletImportBackgroundTaskExecutor$PortletImportCallable.call(PortletImportBackgroundTaskExecutor.java:143) ~[?:?]
      	at com.liferay.exportimport.internal.background.task.PortletImportBackgroundTaskExecutor$PortletImportCallable.call(PortletImportBackgroundTaskExecutor.java:129) ~[?:?]
      	at com.liferay.portal.spring.transaction.BaseTransactionExecutor.execute(BaseTransactionExecutor.java:37) [portal-impl.jar:?]
      	at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:39) [portal-impl.jar:?]
      	at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28) [portal-kernel.jar:?]
      	at com.liferay.exportimport.internal.background.task.PortletImportBackgroundTaskExecutor.execute(PortletImportBackgroundTaskExecutor.java:88) [bundleFile:?]
      	at com.liferay.portal.background.task.internal.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:63) [bundleFile:?]
      	at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:41) [portal-kernel.jar:?]
      	at com.liferay.portal.background.task.internal.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:72) [bundleFile:?]
      	at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:136) [bundleFile:?]
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.doReceive(BaseMessageListener.java:48) [portal-kernel.jar:?]
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:34) [portal-kernel.jar:?]
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74) [portal-kernel.jar:?]
      	at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:56) [bundleFile:?]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
      	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
      Caused by: com.liferay.portal.kernel.exception.SystemException: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portlet.expando.model.impl.ExpandoRowImpl#42485]
      	at com.liferay.portal.spring.hibernate.LastSessionRecorderUtil.syncLastSessionState(LastSessionRecorderUtil.java:54) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.hibernate.LastSessionRecorderHelperImpl.syncLastSessionState(LastSessionRecorderHelperImpl.java:27) ~[portal-impl.jar:?]
      	at com.liferay.portal.kernel.spring.orm.LastSessionRecorderHelperUtil.syncLastSessionState(LastSessionRecorderHelperUtil.java:23) ~[portal-kernel.jar:?]
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:384) ~[portal-kernel.jar:?]
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:367) ~[portal-kernel.jar:?]
      	at com.liferay.expando.exportimport.internal.data.handler.ExpandoPortletDataHandler.doImportData(ExpandoPortletDataHandler.java:130) ~[?:?]
      	at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:392) ~[portal-kernel.jar:?]
      	... 34 more
      Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portlet.expando.model.impl.ExpandoRowImpl#42485]
      	at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1950) ~[hibernate-core.jar:3.6.10.Final]
      	at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2711) ~[hibernate-core.jar:3.6.10.Final]
      	at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2912) ~[hibernate-core.jar:3.6.10.Final]
      	at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97) ~[hibernate-core.jar:3.6.10.Final]
      	at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) ~[hibernate-core.jar:3.6.10.Final]
      	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) ~[hibernate-core.jar:3.6.10.Final]
      	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:189) ~[hibernate-core.jar:3.6.10.Final]
      	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) ~[hibernate-core.jar:3.6.10.Final]
      	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) ~[hibernate-core.jar:3.6.10.Final]
      	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216) ~[hibernate-core.jar:3.6.10.Final]
      	at com.liferay.portal.spring.hibernate.LastSessionRecorderUtil.syncLastSessionState(LastSessionRecorderUtil.java:49) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.hibernate.LastSessionRecorderHelperImpl.syncLastSessionState(LastSessionRecorderHelperImpl.java:27) ~[portal-impl.jar:?]
      	at com.liferay.portal.kernel.spring.orm.LastSessionRecorderHelperUtil.syncLastSessionState(LastSessionRecorderHelperUtil.java:23) ~[portal-kernel.jar:?]
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:384) ~[portal-kernel.jar:?]
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:367) ~[portal-kernel.jar:?]
      	at com.liferay.expando.exportimport.internal.data.handler.ExpandoPortletDataHandler.doImportData(ExpandoPortletDataHandler.java:130) ~[?:?]
      	at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:392) ~[portal-kernel.jar:?]
      	... 34 more
      

      Attachments

        Issue Links

          Activity

            People

              joyce.wang Joyce Wang
              joyce.wang Joyce Wang
              Marta Elicegui Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                25 weeks, 6 days ago

                Packages

                  Version Package
                  Master