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

SystemException throws after enable local live staging with all options

    Details

      Description

      Steps to reproduce:

      1. Start up the portal
      2. Enable liferay site with local live staging and check all options (including page versioning)
      3. Click save

      Expect Result:
      Enable liferay site with local live staging and no error throws.

      Actual Result:
      Enable liferay site with local live staging but the following error throws

      04:26:05,641 ERROR [liferay/background_task-1][PortletPreferencesModelListener:157] Unable to update the layout's modified date
      com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: {mvccVersion=0, uuid=e108cd65-d969-b47b-62c2-d92b682adc05, plid=31116, groupId=31100, companyId=20116, userId=20120, userName=, createDate=Thu Mar 23 03:27:02 GMT 2017, modifiedDate=Thu Mar 23 04:26:05 GMT 2017, privateLayout=false, layoutId=1, parentLayoutId=0, name=<?xml version='1.0' encoding='UTF-8'?><root available-locales="en_US" default-locale="en_US"><Name language-id="en_US">Welcome</Name></root>, title=, description=, keywords=, robots=, type=portlet, typeSettings=column-1=com_liferay_hello_world_web_portlet_HelloWorldPortlet,_layout-template-id=1_column_, hidden=false, friendlyURL=/home, iconImageId=0, themeId=, colorSchemeId=, css=, priority=0, layoutPrototypeUuid=, layoutPrototypeLinkEnabled=false, sourcePrototypeLayoutUuid=, lastPublishDate=null} is stale in comparison to {mvccVersion=1, uuid=e108cd65-d969-b47b-62c2-d92b682adc05, plid=31116, groupId=31100, companyId=20116, userId=20120, userName=, createDate=Thu Mar 23 03:27:02 GMT 2017, modifiedDate=Thu Mar 23 04:26:05 GMT 2017, privateLayout=false, layoutId=1, parentLayoutId=0, name=<?xml version='1.0' encoding='UTF-8'?><root available-locales="en_US" default-locale="en_US"><Name language-id="en_US">Welcome</Name></root>, title=, description=, keywords=, robots=, type=portlet, typeSettings=column-1=com_liferay_hello_world_web_portlet_HelloWorldPortlet,_layout-template-id=1_column_, hidden=false, friendlyURL=/home, iconImageId=0, themeId=, colorSchemeId=, css=, priority=0, layoutPrototypeUuid=, layoutPrototypeLinkEnabled=false, sourcePrototypeLayoutUuid=, lastPublishDate=null} [Sanitized]
      	at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:264)
      	at com.liferay.portal.service.persistence.impl.LayoutPersistenceImpl.updateImpl(LayoutPersistenceImpl.java:10349)
      	at com.liferay.portal.service.persistence.impl.LayoutPersistenceImpl.updateImpl(LayoutPersistenceImpl.java:75)
      	at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.update(BasePersistenceImpl.java:347)
      	at com.liferay.portal.service.base.LayoutLocalServiceBaseImpl.updateLayout(LayoutLocalServiceBaseImpl.java:456)
      	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.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:224)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	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.$Proxy84.updateLayout(Unknown Source)
      	at com.liferay.portal.kernel.service.LayoutLocalServiceUtil.updateLayout(LayoutLocalServiceUtil.java:679)
      	at com.liferay.portal.model.PortletPreferencesModelListener.updateLayout(PortletPreferencesModelListener.java:153)
      	at com.liferay.portal.model.PortletPreferencesModelListener.onAfterUpdate(PortletPreferencesModelListener.java:54)
      	at com.liferay.portal.model.PortletPreferencesModelListener.onAfterUpdate(PortletPreferencesModelListener.java:40)
      	at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.update(BasePersistenceImpl.java:354)
      	at com.liferay.portal.service.impl.PortletPreferencesLocalServiceImpl.updatePreferences(PortletPreferencesLocalServiceImpl.java:459)
      	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.$Proxy120.updatePreferences(Unknown Source)
      	at com.liferay.exportimport.controller.PortletImportController.updatePortletPreferences(PortletImportController.java:1333)
      	at com.liferay.exportimport.controller.PortletImportController.importPortletPreferences(PortletImportController.java:1025)
      	at com.liferay.exportimport.controller.LayoutImportController.doImportFile(LayoutImportController.java:805)
      	at com.liferay.exportimport.controller.LayoutImportController.importFile(LayoutImportController.java:224)
      	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.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:202)
      	at com.liferay.exportimport.background.task.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:267)
      	at com.liferay.exportimport.background.task.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:240)
      	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:137)
      	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.portal.kernel.dao.orm.ORMException: {mvccVersion=0, uuid=e108cd65-d969-b47b-62c2-d92b682adc05, plid=31116, groupId=31100, companyId=20116, userId=20120, userName=, createDate=Thu Mar 23 03:27:02 GMT 2017, modifiedDate=Thu Mar 23 04:26:05 GMT 2017, privateLayout=false, layoutId=1, parentLayoutId=0, name=<?xml version='1.0' encoding='UTF-8'?><root available-locales="en_US" default-locale="en_US"><Name language-id="en_US">Welcome</Name></root>, title=, description=, keywords=, robots=, type=portlet, typeSettings=column-1=com_liferay_hello_world_web_portlet_HelloWorldPortlet,_layout-template-id=1_column_, hidden=false, friendlyURL=/home, iconImageId=0, themeId=, colorSchemeId=, css=, priority=0, layoutPrototypeUuid=, layoutPrototypeLinkEnabled=false, sourcePrototypeLayoutUuid=, lastPublishDate=null} is stale in comparison to {mvccVersion=1, uuid=e108cd65-d969-b47b-62c2-d92b682adc05, plid=31116, groupId=31100, companyId=20116, userId=20120, userName=, createDate=Thu Mar 23 03:27:02 GMT 2017, modifiedDate=Thu Mar 23 04:26:05 GMT 2017, privateLayout=false, layoutId=1, parentLayoutId=0, name=<?xml version='1.0' encoding='UTF-8'?><root available-locales="en_US" default-locale="en_US"><Name language-id="en_US">Welcome</Name></root>, title=, description=, keywords=, robots=, type=portlet, typeSettings=column-1=com_liferay_hello_world_web_portlet_HelloWorldPortlet,_layout-template-id=1_column_, hidden=false, friendlyURL=/home, iconImageId=0, themeId=, colorSchemeId=, css=, priority=0, layoutPrototypeUuid=, layoutPrototypeLinkEnabled=false, sourcePrototypeLayoutUuid=, lastPublishDate=null} [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.LayoutPersistenceImpl.updateImpl(LayoutPersistenceImpl.java:10345)
      	... 90 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.LayoutImpl#31116]
      	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)
      	... 92 more
      

      https://gist.github.com/sharonchoi/4948c5a8420153c04e35ea0c3397273e

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 24 weeks, 1 day ago

                  Packages

                  Version Package
                  7.0.0 DXP FP20
                  7.0.3 CE GA4
                  7.0.0 DXP SP4
                  7.0.X EE