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

Asset Publisher throws ORMException when configured

    Details

      Description

      Steps to reproduce:

      1. Add a Folder in Web Content Administration
      2. Navigate to page
      3. Add Asset Publisher to the page
      4. Click ellipsis > Configuration
      5. Select Manual
      6. Under "Asset Entries", click select > Web Content Folder
      7. Select Web Content Folder

      Expected result:
      Either Folders won't be visible for adding, or the following error won't be thrown when adding them to the page.

      Actual result:
      They display for adding, and console throws the following after Asset Publisher fails to load the folder.

      This exception is also thrown for the following cases:
      Manual or Dynamic select any wiki
      Manual select Blog or WC Article

      Alternate steps to reproduce:

      1. Add a Folder in Web Content Administration Bookmarks, | a Blog entry | a MB post | a Document
      2. Navigate to a page
      3. Click '+' to open the Add panel > click Content tab
      4. Click or drag and drop the asset
      15:49:59,177 ERROR [liferay/background_task-4][PortletPreferencesModelListener:157] Unable to update the layout's modified date
      com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: {mvccVersion=6, uuid=d75bbd56-9a43-8e8d-c98b-863341f91b31, plid=30251, groupId=30246, companyId=20116, userId=20164, userName=Test Test, createDate=Wed Jun 08 15:43:15 GMT 2016, modifiedDate=Wed Jun 08 15:49:59 GMT 2016, 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">page1</Name></root>, title=, description=, keywords=, robots=, type=portlet, typeSettings=column-1=com_liferay_journal_content_web_portlet_JournalContentPortlet_INSTANCE_K3iqMu0eRUiL,com_liferay_journal_content_web_portlet_JournalContentPortlet_INSTANCE_14TC0Uym9coS_layout-template-id=1_column_, hidden=false, friendlyURL=/page1, iconImageId=0, themeId=, colorSchemeId=, css=, priority=0, layoutPrototypeUuid=, layoutPrototypeLinkEnabled=false, sourcePrototypeLayoutUuid=, lastPublishDate=null} is stale in comparison to {mvccVersion=8, uuid=d75bbd56-9a43-8e8d-c98b-863341f91b31, plid=30251, groupId=30246, companyId=20116, userId=20164, userName=Test Test, createDate=2016-06-08 15:43:15.73, modifiedDate=2016-06-08 15:49:59.157, 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">page1</Name></root>, title=, description=, keywords=, robots=, type=portlet, typeSettings=column-1=com_liferay_journal_content_web_portlet_JournalContentPortlet_INSTANCE_K3iqMu0eRUiL,com_liferay_journal_content_web_portlet_JournalContentPortlet_INSTANCE_14TC0Uym9coS,com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_gVxbCMLEgfuo_layout-template-id=1_column_, hidden=false, friendlyURL=/page1, 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:267)
              at com.liferay.portal.service.persistence.impl.LayoutPersistenceImpl.updateImpl(LayoutPersistenceImpl.java:8509)
              at com.liferay.portal.service.persistence.impl.LayoutPersistenceImpl.updateImpl(LayoutPersistenceImpl.java:75)
              at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.update(BasePersistenceImpl.java:348)
              at com.liferay.portal.service.base.LayoutLocalServiceBaseImpl.updateLayout(LayoutLocalServiceBaseImpl.java:454)
              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:153)
              at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:180)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:225)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy81.updateLayout(Unknown Source)
              at com.liferay.portal.kernel.service.LayoutLocalServiceUtil.updateLayout(LayoutLocalServiceUtil.java:663)
              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:355)
              at com.liferay.portal.service.impl.PortletPreferencesLocalServiceImpl.updatePreferences(PortletPreferencesLocalServiceImpl.java:403)
              at com.liferay.portal.service.impl.PortletPreferencesLocalServiceImpl.updatePreferences(PortletPreferencesLocalServiceImpl.java:371)
              at sun.reflect.GeneratedMethodAccessor1742.invoke(Unknown Source)
              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:153)
              at com.liferay.portal.service.impl.PortletPreferencesLocalServiceStagingAdvice.updatePreferences(PortletPreferencesLocalServiceStagingAdvice.java:259)
              at com.liferay.portal.service.impl.PortletPreferencesLocalServiceStagingAdvice.invoke(PortletPreferencesLocalServiceStagingAdvice.java:83)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy109.updatePreferences(Unknown Source)
              at com.liferay.portal.kernel.service.PortletPreferencesLocalServiceUtil.updatePreferences(PortletPreferencesLocalServiceUtil.java:172)
              at com.liferay.portlet.PortletPreferencesImpl.store(PortletPreferencesImpl.java:176)
              at com.liferay.asset.publisher.web.background.task.AssetPublisherNotificationBackgroundTaskExecutor.execute(AssetPublisherNotificationBackgroundTaskExecutor.java:99)
              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:123)
              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=6, uuid=d75bbd56-9a43-8e8d-c98b-863341f91b31, plid=30251, groupId=30246, companyId=20116, userId=20164, userName=Test Test, createDate=Wed Jun 08 15:43:15 GMT 2016, modifiedDate=Wed Jun 08 15:49:59 GMT 2016, 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">page1</Name></root>, title=, description=, keywords=, robots=, type=portlet, typeSettings=column-1=com_liferay_journal_content_web_portlet_JournalContentPortlet_INSTANCE_K3iqMu0eRUiL,com_liferay_journal_content_web_portlet_JournalContentPortlet_INSTANCE_14TC0Uym9coS_layout-template-id=1_column_, hidden=false, friendlyURL=/page1, iconImageId=0, themeId=, colorSchemeId=, css=, priority=0, layoutPrototypeUuid=, layoutPrototypeLinkEnabled=false, sourcePrototypeLayoutUuid=, lastPublishDate=null} is stale in comparison to {mvccVersion=8, uuid=d75bbd56-9a43-8e8d-c98b-863341f91b31, plid=30251, groupId=30246, companyId=20116, userId=20164, userName=Test Test, createDate=2016-06-08 15:43:15.73, modifiedDate=2016-06-08 15:49:59.157, 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">page1</Name></root>, title=, description=, keywords=, robots=, type=portlet, typeSettings=column-1=com_liferay_journal_content_web_portlet_JournalContentPortlet_INSTANCE_K3iqMu0eRUiL,com_liferay_journal_content_web_portlet_JournalContentPortlet_INSTANCE_14TC0Uym9coS,com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_gVxbCMLEgfuo_layout-template-id=1_column_, hidden=false, friendlyURL=/page1, 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:243)
              at com.liferay.portal.kernel.dao.orm.ClassLoaderSession.merge(ClassLoaderSession.java:410)
              at com.liferay.portal.service.persistence.impl.LayoutPersistenceImpl.updateImpl(LayoutPersistenceImpl.java:8505)
              ... 52 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#30251]
              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:240)
              ... 54 more
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 18 weeks, 4 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP1
                  7.0.2 CE GA3
                  7.0.0 DXP SP1
                  7.0.3 CE GA4
                  Master