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

Fail to publish a conflicts automatically resolved publication on SQLServer 2019

    Details

      Description

      Steps to reproduce

      1. Add a new web content with content "Web Content Content"
      2. Enable Publications
      3. Add a new publication "P1"
      4. Edit the Web Content content to "Web Content Content 1"
      5. Add a new publication "P2"
      6. Edit the Web Content content to "Web Content Content 2"
      7. Publish "P2"
      8. Select "P1"
      9. Goto Publish "P1
      10. Assert the conflicts were all automatically resolved
      11. Publish "P1"

      Actual Result:
      "P1" fails to publish and SQLServerException throws.

      2021-03-17 05:22:11.233 ERROR [liferay/background_task-8][BackgroundTaskMessageListener:182] Unable to execute background task
      com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert duplicate key row in object 'dbo.LayoutClassedModelUsage' with unique index 'IX_63EAFC82'. The duplicate key value is (20135, 44326, <NULL>, 0, 0, 0).
      	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1624)
      	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:594)
      	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:524)
      	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7194)
      	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2979)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:248)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:223)
      	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:473)
      	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:185)
      	at com.liferay.layout.service.base.LayoutClassedModelUsageLocalServiceBaseImpl.updateWithUnsafeFunction(LayoutClassedModelUsageLocalServiceBaseImpl.java:625)
      	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.$Proxy1138.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:168)
      	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.$Proxy884.execute(Unknown Source)
      	at com.liferay.portal.background.task.internal.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:63)
      	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)
      2021-03-17 05:27:00.401 WARN  [liferay/a
      

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            linda.sui Linda Sui
            Participants of an Issue:
            Recent user:
            Brian Wulbern
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

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

                Packages

                Version Package