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

ORMException occurs when reset asset publisher's system setting

    Details

    • Fix Priority:
      1

      Description

      Steps to reproduce:

      1. Set up remote staging in two bundle.
      2. Add an asset publisher.
      3. Create a blog entry.
      4. Control panel -> Configuration -> System settings -> Assets -> Asset Publisher
      5. Click Save button without any change.
      6. Reset default settings.

      Expected result:
      Reset is successful without any errors.

      Actual result:
      Success message shows up and the following errors display in the console:

      2019-12-20 09:12:08.078 ERROR [liferay/scheduler_dispatch-1][ParallelDestination:62] Unable to process message {destinationName=liferay/scheduler_dispatch, response=null, responseDestinationName=null, responseId=null, payload=null, values={GROUP_NAME=com.liferay.asset.publisher.web.internal.messaging.CheckAssetEntryMessageListener, companyId=0, groupId=0, DESTINATION_NAME=liferay/scheduler_dispatch, EXCEPTIONS_MAX_SIZE=0, JOB_STATE=com.liferay.portal.kernel.scheduler.JobState@665e5fb4, STORAGE_TYPE=MEMORY_CLUSTERED, JOB_NAME=com.liferay.asset.publisher.web.internal.messaging.CheckAssetEntryMessageListener}}
      com.liferay.portal.kernel.messaging.MessageListenerException: com.liferay.portal.kernel.exception.SystemException: org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [com.liferay.portal.model.impl.LayoutImpl] with identifier [22]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portal.model.impl.LayoutImpl#22]
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:32)
              at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper._processMessage(SchedulerEventMessageListenerWrapper.java:127)
              at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper.receive(SchedulerEventMessageListenerWrapper.java:98)
              at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
              at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:59)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:752)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:664)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: com.liferay.portal.kernel.exception.SystemException: org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [com.liferay.portal.model.impl.LayoutImpl] with identifier [22]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portal.model.impl.LayoutImpl#22]
              at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.doPerformActions(DefaultActionableDynamicQuery.java:340)
              at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.performActions(DefaultActionableDynamicQuery.java:86)
              at com.liferay.asset.publisher.web.internal.messaging.AssetEntriesCheckerUtil.checkAssetEntries(AssetEntriesCheckerUtil.java:98)
              at com.liferay.asset.publisher.web.internal.messaging.CheckAssetEntryMessageListener.doReceive(CheckAssetEntryMessageListener.java:80)
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
              ... 7 more
      Caused by: org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [com.liferay.portal.model.impl.LayoutImpl] with identifier [22]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.portal.model.impl.LayoutImpl#22]
              at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:699)
              at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:800)
              at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:671)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:765)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:734)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.commit(DefaultTransactionExecutor.java:41)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
              at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
              at com.sun.proxy.$Proxy73.updatePreferences(Unknown Source)
              at com.liferay.portal.kernel.service.PortletPreferencesLocalServiceUtil.updatePreferences(PortletPreferencesLocalServiceUtil.java:512)
              at com.liferay.portlet.PortletPreferencesImpl.store(PortletPreferencesImpl.java:176)
              at com.liferay.asset.publisher.web.internal.messaging.AssetEntriesCheckerUtil._checkAssetEntries(AssetEntriesCheckerUtil.java:165)
              at com.liferay.asset.publisher.web.internal.messaging.AssetEntriesCheckerUtil.lambda$checkAssetEntries$1(AssetEntriesCheckerUtil.java:96)
              at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.performAction(DefaultActionableDynamicQuery.java:394)
              at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery$1.call(DefaultActionableDynamicQuery.java:306)
              at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery$1.call(DefaultActionableDynamicQuery.java:268)
              at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.doPerformActions(DefaultActionableDynamicQuery.java:326)
              ... 11 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#22]
              at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1950)
              at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2595)
              at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2495)
              at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2822)
              at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:113)
              at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
              at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
              at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185)
              at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
              at com.liferay.portal.dao.orm.hibernate.event.NestableFlushEventListener.onFlush(NestableFlushEventListener.java:61)
              at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
              at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
              at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
              at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:663)
              ... 26 more
      

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            joyce.wang Joyce Wang
            Participants of an Issue:
            Recent user:
            Yang Cao
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              1 week ago

                Packages

                Version Package