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

StaleStateException happens when reselect manual asset on configuration modal of Asset Publisher

Details

    Description

      Step to reproduce:

      1. Add two web contents
      2. Add an Asset Publisher to a widget page
      3. Navigate to the configuration modal of Asset Publisher
      4. Change the Asset Selection to Manual
      5. Expand the Asset Entries section
      6. Select both web contents
      7. Remove one
      8. Reselect that web content

      Expected Results:
      The configuration modal should be rendered well.

      Actual Results:
      The configuration modal becomes empty. The following error is thrown on server console:

      2023-02-14 02:35:34.001 ERROR [http-nio-8080-exec-10][BatchingBatch:139] HHH000315: Exception executing batch [org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; statement executed: update PortletPreferenceValue set mvccVersion=?, smallValue=? where portletPreferenceValueId=? and mvccVersion=?], SQL: update PortletPreferenceValue set mvccVersion=?, smallValue=? where portletPreferenceValueId=? and mvccVersion=?
      2023-02-14 02:35:34.008 ERROR [http-nio-8080-exec-10][PortletServlet:118] Unable to process portlet com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet: org.springframework.orm.hibernate5.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; statement executed: update PortletPreferenceValue set mvccVersion=?, smallValue=? where portletPreferenceValueId=? and mvccVersion=?; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; statement executed: update PortletPreferenceValue set mvccVersion=?, smallValue=? where portletPreferenceValueId=? and mvccVersion=?
      javax.portlet.PortletException:
      

      Reproduced on:
      Tomcat 9.0.71 + MySQL 5.7. Portal master GIT ID: a5c96d94cf09ad045c4ab352ae0730a8f5af5712.
      Tomcat 9.0.71 + MySQL 5.7. Portal 7.4.13-DXP-U64 build #6356.

      Attachments

        Activity

          People

            support-lep@liferay.com SE Support
            yang.cao Yang Cao
            Rafaela Nascimento Rafaela Nascimento
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              13 weeks, 5 days ago

              Packages

                Version Package
                7.4.13 DXP U66
                7.4.3.66 CE GA66
                Master