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

Importing themes causes org.hibernate.StaleObjectStateException in LayoutSetImp/LayoutSetPrototypeImpl

    Details

      Description

      When LayoutSet*ModelListeners are triggered during updatePageCount and updateImpl the following exception occurs:

      Caused by: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException:

      {mvccVersion=56, layoutSetId=32620, groupId=32619, companyId=20116, createDate=Wed Aug 31 16:28:03 GMT 2016, modifiedDate=Wed Aug 31 16:28:09 GMT 2016, privateLayout=true, logoId=32626, themeId=westerosbank_WAR_westerosbanktheme, colorSchemeId=01, css=, pageCount=28, settings=showSiteName=false [junit] , layoutSetPrototypeUuid=, layoutSetPrototypeLinkEnabled=false}

      is stale in comparison to

      {mvccVersion=57, layoutSetId=32620, groupId=32619, companyId=20116, createDate=2016-08-31 16:28:03.602, modifiedDate=2016-08-31 16:28:08.838, privateLayout=true, logoId=32626, themeId=westerosbank_WAR_westerosbanktheme, colorSchemeId=01, css=, pageCount=27, settings=showSiteName=false [junit] , layoutSetPrototypeUuid=, layoutSetPrototypeLinkEnabled=false}

      [junit] at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:267)
      [junit] at com.liferay.portal.service.persistence.impl.LayoutSetPersistenceImpl.updateImpl(LayoutSetPersistenceImpl.java:1672)
      [junit] at com.liferay.portal.service.persistence.impl.LayoutSetPersistenceImpl.updateImpl(LayoutSetPersistenceImpl.java:70)
      [junit] at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.update(BasePersistenceImpl.java:348)
      [junit] at com.liferay.portal.service.impl.LayoutSetLocalServiceImpl.updatePageCount(LayoutSetLocalServiceImpl.java:344)
      [junit] at sun.reflect.GeneratedMethodAccessor905.invoke(Unknown Source)
      [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [junit] at java.lang.reflect.Method.invoke(Method.java:497)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
      [junit] at com.liferay.portal.service.impl.LayoutSetLocalServiceStagingAdvice.invoke(LayoutSetLocalServiceStagingAdvice.java:66)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      [junit] at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
      [junit] at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      [junit] at com.liferay.portal.spring.aop.RetryAdvice.invoke(RetryAdvice.java:46)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      [junit] at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:40)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      [junit] at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      [junit] at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      [junit] at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      [junit] at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      [junit] at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      [junit] at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      [junit] at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      [junit] at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      [junit] at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      [junit] at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
      [junit] at com.sun.proxy.$Proxy169.updatePageCount(Unknown Source)
      [junit] at com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutStagedModelDataHandler.doImportStagedModel(LayoutStagedModelDataHandler.java:645)
      [junit] at com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutStagedModelDataHandler.doImportStagedModel(LayoutStagedModelDataHandler.java:94)
      [junit] at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:363)
      [junit] ... 51 more
      [junit] Caused by: com.liferay.portal.kernel.dao.orm.ORMException:

      {mvccVersion=56, layoutSetId=32620, groupId=32619, companyId=20116, createDate=Wed Aug 31 16:28:03 GMT 2016, modifiedDate=Wed Aug 31 16:28:09 GMT 2016, privateLayout=true, logoId=32626, themeId=westerosbank_WAR_westerosbanktheme, colorSchemeId=01, css=, pageCount=28, settings=showSiteName=false [junit] , layoutSetPrototypeUuid=, layoutSetPrototypeLinkEnabled=false}

      is stale in comparison to

      {mvccVersion=57, layoutSetId=32620, groupId=32619, companyId=20116, createDate=2016-08-31 16:28:03.602, modifiedDate=2016-08-31 16:28:08.838, privateLayout=true, logoId=32626, themeId=westerosbank_WAR_westerosbanktheme, colorSchemeId=01, css=, pageCount=27, settings=showSiteName=false [junit] , layoutSetPrototypeUuid=, layoutSetPrototypeLinkEnabled=false}

      [junit] at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:46)
      [junit] at com.liferay.portal.dao.orm.hibernate.SessionImpl.merge(SessionImpl.java:244)
      [junit] at com.liferay.portal.kernel.dao.orm.ClassLoaderSession.merge(ClassLoaderSession.java:410)
      [junit] at com.liferay.portal.service.persistence.impl.LayoutSetPersistenceImpl.updateImpl(LayoutSetPersistenceImpl.java:1668)
      [junit] ... 90 more
      [junit] Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): com.liferay.portal.model.impl.LayoutSetImpl#32620
      [junit] at org.hibernate.event.def.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:485)
      [junit] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:255)
      [junit] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:84)
      [junit] at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:867)
      [junit] at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:851)
      [junit] at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:855)
      [junit] at com.liferay.portal.dao.orm.hibernate.SessionImpl.merge(SessionImpl.java:241)
      [junit] ... 92 more

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              preston.crary Preston Crary
              Reporter:
              peter.fellwock Peter Fellwock (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 48 weeks, 5 days ago

                  Packages

                  Version Package
                  7.0.X EE
                  Master