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

Remote Staging can be published to live with ORMException which only occurred on the first publish

    Details

      Description

      Steps to reproduce:

      1. Create a site
      2. Setup remote staging
      3. Navigate to Welcome page on staging
      4. Publish to Live

      Expected Result: User can publish to remote site without errors.
      Actual Result: Publish process is successful with the following errors:

      2017-12-04 09:17:50.195 ERROR [liferay/background_task-1][ExportImportDateUtil:358] java.io.IOException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: {mvccVersion=0, portletPreferencesId=35295, companyId=20116, ownerId=0, ownerType=3, plid=0, portletId=com_liferay_document_library_web_portlet_DLPortlet, preferences=<portlet-preferences><preference><name>last-publish-date</name><value>1512379070187</value></preference></portlet-preferences>} is stale in comparison to {mvccVersion=1, portletPreferencesId=35295, companyId=20116, ownerId=0, ownerType=3, plid=0, portletId=com_liferay_document_library_web_portlet_DLPortlet, preferences=<?xml version="1.0"?>__<portlet-preferences owner-id="0" owner-type="3" default-user="false" plid="0" portlet-id="com_liferay_document_library_web_portlet_DLPortlet"/>} [Sanitized]
      java.io.IOException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: {mvccVersion=0, portletPreferencesId=35295, companyId=20116, ownerId=0, ownerType=3, plid=0, portletId=com_liferay_document_library_web_portlet_DLPortlet, preferences=<portlet-preferences><preference><name>last-publish-date</name><value>1512379070187</value></preference></portlet-preferences>} is stale in comparison to {mvccVersion=1, portletPreferencesId=35295, companyId=20116, ownerId=0, ownerType=3, plid=0, portletId=com_liferay_document_library_web_portlet_DLPortlet, preferences=<?xml version="1.0"?>__<portlet-preferences owner-id="0" owner-type="3" default-user="false" plid="0" portlet-id="com_liferay_document_library_web_portlet_DLPortlet"/>} [Sanitized]
      	at com.liferay.portlet.PortletPreferencesImpl.store(PortletPreferencesImpl.java:180)
      	at com.liferay.exportimport.kernel.lar.ExportImportDateUtil.updateLastPublishDate(ExportImportDateUtil.java:348)
      	at com.liferay.exportimport.controller.PortletExportController$UpdatePortletLastPublishDateCallable.call(PortletExportController.java:1418)
      	at com.liferay.exportimport.controller.PortletExportController$UpdatePortletLastPublishDateCallable.call(PortletExportController.java:1375)
      	at com.liferay.exportimport.internal.lifecycle.ExportImportProcessCallbackLifecycleListener.onProcessSucceeded(ExportImportProcessCallbackLifecycleListener.java:70)
      	at com.liferay.exportimport.kernel.lifecycle.BaseProcessExportImportLifecycleListener.onExportImportLifecycleEvent(BaseProcessExportImportLifecycleListener.java:102)
      	at com.liferay.exportimport.lifecycle.BaseExportImportLifecycleMessageListener.doReceive(BaseExportImportLifecycleMessageListener.java:45)
      	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.SynchronousDestination.send(SynchronousDestination.java:41)
      	at com.liferay.portal.messaging.internal.DefaultMessageBus.sendMessage(DefaultMessageBus.java:231)
      	at com.liferay.exportimport.lifecycle.ExportImportLifecycleManagerImpl.fireExportImportLifecycleEvent(ExportImportLifecycleManagerImpl.java:114)
      	at com.liferay.exportimport.lifecycle.ExportImportLifecycleManagerImpl.fireExportImportLifecycleEvent(ExportImportLifecycleManagerImpl.java:72)
      	at com.liferay.exportimport.kernel.lifecycle.ExportImportLifecycleManagerUtil.fireExportImportLifecycleEvent(ExportImportLifecycleManagerUtil.java:44)
      	at com.liferay.exportimport.background.task.LayoutRemoteStagingBackgroundTaskExecutor.execute(LayoutRemoteStagingBackgroundTaskExecutor.java:148)
      	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:745)
      Caused by: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: {mvccVersion=0, portletPreferencesId=35295, companyId=20116, ownerId=0, ownerType=3, plid=0, portletId=com_liferay_document_library_web_portlet_DLPortlet, preferences=<portlet-preferences><preference><name>last-publish-date</name><value>1512379070187</value></preference></portlet-preferences>} is stale in comparison to {mvccVersion=1, portletPreferencesId=35295, companyId=20116, ownerId=0, ownerType=3, plid=0, portletId=com_liferay_document_library_web_portlet_DLPortlet, preferences=<?xml version="1.0"?>__<portlet-preferences owner-id="0" owner-type="3" default-user="false" plid="0" portlet-id="com_liferay_document_library_web_portlet_DLPortlet"/>} [Sanitized]
      	at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:268)
      	at com.liferay.portal.service.persistence.impl.PortletPreferencesPersistenceImpl.updateImpl(PortletPreferencesPersistenceImpl.java:5431)
      	at com.liferay.portal.service.persistence.impl.PortletPreferencesPersistenceImpl.updateImpl(PortletPreferencesPersistenceImpl.java:66)
      	at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.update(BasePersistenceImpl.java:350)
      	at com.liferay.portal.service.impl.PortletPreferencesLocalServiceImpl.updatePreferences(PortletPreferencesLocalServiceImpl.java:533)
      	at com.liferay.portal.service.impl.PortletPreferencesLocalServiceImpl.updatePreferences(PortletPreferencesLocalServiceImpl.java:498)
      	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.$Proxy135.updatePreferences(Unknown Source)
      	at com.liferay.portal.kernel.service.PortletPreferencesLocalServiceUtil.updatePreferences(PortletPreferencesLocalServiceUtil.java:414)
      	at com.liferay.portlet.PortletPreferencesImpl.store(PortletPreferencesImpl.java:176)
      	... 24 more
      Caused by: com.liferay.portal.kernel.dao.orm.ORMException: {mvccVersion=0, portletPreferencesId=35295, companyId=20116, ownerId=0, ownerType=3, plid=0, portletId=com_liferay_document_library_web_portlet_DLPortlet, preferences=<portlet-preferences><preference><name>last-publish-date</name><value>1512379070187</value></preference></portlet-preferences>} is stale in comparison to {mvccVersion=1, portletPreferencesId=35295, companyId=20116, ownerId=0, ownerType=3, plid=0, portletId=com_liferay_document_library_web_portlet_DLPortlet, preferences=<?xml version="1.0"?>__<portlet-preferences owner-id="0" owner-type="3" default-user="false" plid="0" portlet-id="com_liferay_document_library_web_portlet_DLPortlet"/>} [Sanitized]
      	at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:46)
      	at com.liferay.portal.dao.orm.hibernate.SessionImpl.merge(SessionImpl.java:244)
      	at com.liferay.portal.kernel.dao.orm.ClassLoaderSession.merge(ClassLoaderSession.java:410)
      	at com.liferay.portal.service.persistence.impl.PortletPreferencesPersistenceImpl.updateImpl(PortletPreferencesPersistenceImpl.java:5427)
      	... 42 more
      Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portal.model.impl.PortletPreferencesImpl#35295]
      	at org.hibernate.event.def.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:485)
      	at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:255)
      	at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:84)
      	at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:867)
      	at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:851)
      	at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:855)
      	at com.liferay.portal.dao.orm.hibernate.SessionImpl.merge(SessionImpl.java:241)
      	... 44 more
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 39 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP44
                  7.0.6 CE GA7
                  7.0.0 DXP SP8
                  7.0.X