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

Fail to publish publication when modifying the different documents to the same name

    Description

    Steps to reproduce

    1. Add two different documents "DM Title 1" and "DM Title 2"
    2. Enable Publications
    3. Add a new publication "P1"
    4. Modify "DM Title 1" to "DM Title"
    5. Add a new publication "P2"
    6. Modify "DM Title 2" to "DM Title"
    7. Publish "P2"
    8. Go to publish "P1"

    Actual Result:
    There is no conflict error, "P1" fails to publish and follwoing error throws

    2021-09-03 12:02:26.722 ERROR [liferay/background_task-5][BackgroundTaskMessageListener:182] Unable to execute background task
    java.sql.SQLIntegrityConstraintViolationException: Duplicate entry '20123-0-Actual Result-0' for key 'DLFileEntry.IX_EAAB273'
    	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117) ~[mysql.jar:8.0.21]
    	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql.jar:8.0.21]
    	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql.jar:8.0.21]
    	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) ~[mysql.jar:8.0.21]
    	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1092) ~[mysql.jar:8.0.21]
    	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1040) ~[mysql.jar:8.0.21]
    	at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1347) ~[mysql.jar:8.0.21]
    	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1025) ~[mysql.jar:8.0.21]
    	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) ~[hikaricp.jar:?]
    	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) ~[hikaricp.jar:?]
    	at com.liferay.change.tracking.internal.CTRowUtil.copyCTRows(CTRowUtil.java:123) ~[?:?]
    	at com.liferay.change.tracking.internal.background.task.CTServicePublisher._publish(CTServicePublisher.java:233) ~[?:?]
    	at com.liferay.portlet.documentlibrary.service.base.DLFileEntryLocalServiceBaseImpl.updateWithUnsafeFunction(DLFileEntryLocalServiceBaseImpl.java:1758) ~[portal-impl.jar:?]
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_291]
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_291]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_291]
    	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_291]
    	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50) ~[portal-impl.jar:?]
    	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69) ~[portal-impl.jar:?]
    	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57) ~[portal-impl.jar:?]
    	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49) ~[portal-impl.jar:?]
    	at com.sun.proxy.$Proxy78.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:169) ~[?:?]
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_291]
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_291]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_291]
    	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_291]
    	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50) ~[portal-impl.jar:?]
    	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69) ~[portal-impl.jar:?]
    	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57) ~[portal-impl.jar:?]
    	at com.liferay.change.tracking.internal.aop.CTTransactionAdvice.invoke(CTTransactionAdvice.java:80) ~[?:?]
    	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57) ~[portal-impl.jar:?]
    	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49) ~[portal-impl.jar:?]
    	at com.sun.proxy.$Proxy701.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) ~[portal-kernel.jar:?]
    	at com.liferay.portal.background.task.internal.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:72) ~[bundleFile:?]
    	at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:136) [bundleFile:?]
    	at com.liferay.portal.kernel.messaging.BaseMessageListener.doReceive(BaseMessageListener.java:48) [portal-kernel.jar:?]
    	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:34) [portal-kernel.jar:?]
    	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74) [portal-kernel.jar:?]
    	at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:56) [bundleFile:?]
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_291]
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_291]
    	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_291]
    

      Attachments

        Issue Links

          Activity

            People

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

              Dates

              Created:
              Updated:
              Days since last comment:
              49 weeks ago

                Packages

                Version Package