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

Intermittent SQLIntegrityConstraintViolationException on Publishing web content deletion

    Details

      Description

      Steps to reproduce

      1. Add a new web content named "Web Content Title"
      2. Enable Change List
      3. Add a new Publication "P1"
      4. Move the web content to Recycle Bin
      5. Delete the web content in Recycle Bin
      6. Add a new Publication "P2"
      7. Edit the web content, rename to "Web Content Edited Title"
      8. Select publication "P1"
      9. Prepare to Publish
      10. Publish

      Actual Result:
      Fail to publish and the following error throws.

      2020-08-27 01:59:34.191 ERROR [liferay/background_task-4][BackgroundTaskMessageListener:182] Unable to execute background task
      java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '38064-1' for key 'PRIMARY'
              at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117)
              at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
              at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
              at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:955)
              at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1094)
              at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1042)
              at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1345)
              at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1027)
              at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
              at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
              at com.liferay.change.tracking.internal.background.task.CTServicePublisher._updateCTCollectionId(CTServicePublisher.java:324)
              at com.liferay.change.tracking.internal.background.task.CTServicePublisher._publish(CTServicePublisher.java:152)
              at com.liferay.portlet.asset.service.base.AssetEntryLocalServiceBaseImpl.updateWithUnsafeFunction(AssetEntryLocalServiceBaseImpl.java:1178)
              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:498)
              at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
              at com.sun.proxy.$Proxy557.updateWithUnsafeFunction(Unknown Source)
              at com.liferay.asset.kernel.service.AssetEntryLocalServiceWrapper.updateWithUnsafeFunction(AssetEntryLocalServiceWrapper.java:1049)
              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:498)
              at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
              at com.sun.proxy.$Proxy558.updateWithUnsafeFunction(Unknown Source)
              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:498)
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
              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.$Proxy45.updateWithUnsafeFunction(Unknown Source)
              at com.liferay.change.tracking.internal.background.task.CTServicePublisher.publish(CTServicePublisher.java:86)
              at com.liferay.change.tracking.internal.background.task.CTPublishBackgroundTaskExecutor.execute(CTPublishBackgroundTaskExecutor.java:161)
              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:498)
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
              at com.liferay.change.tracking.internal.aop.CTTransactionAdvice.invoke(CTTransactionAdvice.java:80)
              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.$Proxy580.execute(Unknown Source)
              at com.liferay.portal.background.task.internal.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:62)
              at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:41)
              at com.liferay.portal.background.task.internal.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:72)
              at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:136)
              at com.liferay.portal.kernel.messaging.BaseMessageListener.doReceive(BaseMessageListener.java:48)
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:34)
              at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
              at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:56)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Activity

            People

            Assignee:
            linda.sui Linda Sui
            Reporter:
            linda.sui Linda Sui
            Participants of an Issue:
            Recent user:
            Enterprise Release HU
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              5 weeks, 6 days ago

                Packages

                Version Package
                7.0.0 DXP FP95
                7.0.X
                7.1.X
                7.2.X
                7.3.X
                7.3.5 CE GA6
                7.3.10 DXP GA1
                Master