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

Renamed tags cannot be published to live if they were published before with another name

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 7.0.0 M7
    • Fix Version/s: 7.0.0 M7
    • Component/s: WCM, WCM > Tags
    • Labels:
      None

      Description

      Steps to reproduce

      1. Create a tag
      2. Create a web content
      3. In the categories section assign the tag to the web content.
      4. Add the the web content and the tag navigation portlet to a page.
      5. Publish everything to Live (default settings)
        (Success!)
      6. Change tag name
      7. Make sure that the name is also changed at the web content and the tag navigation portlet.
      8. Publish again to Live (default settings)

      Expected
      The publishing process finishes successfully. The tag can be seen at live site with the new name.

      Current behavior
      It fails with an error message: "com.liferay.portal.kernel.exception.SystemException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update"

      07:58:32,062 ERROR [liferay/background_task-1][JDBCExceptionReporter:234] Duplicate entry 'c9355be5-0ff4-d244-277f-a493f17206bc-20637' for key 'IX_B6ACB166'
      07:58:32,092 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:154] Unable to execute background task
      com.liferay.portlet.exportimport.lar.PortletDataException: com.liferay.portal.kernel.exception.SystemException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
      	at com.liferay.portlet.exportimport.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:378)
      	at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:307)
      	at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:768)
      	at com.liferay.exportimport.controller.LayoutImportController.doImportFile(LayoutImportController.java:794)
      	at com.liferay.exportimport.controller.LayoutImportController.importFile(LayoutImportController.java:221)
      	at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:191)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:149)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:93)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
      	at com.sun.proxy.$Proxy184.importLayouts(Unknown Source)
      	at com.liferay.portlet.exportimport.service.ExportImportLocalServiceUtil.importLayouts(ExportImportLocalServiceUtil.java:100)
      	at com.liferay.portlet.exportimport.backgroundtask.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:211)
      	at com.liferay.portlet.exportimport.backgroundtask.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:184)
      	at com.liferay.portal.spring.transaction.TransactionInvokerImpl$CallableMethodInvocation.proceed(TransactionInvokerImpl.java:113)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:93)
      	at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:41)
      	at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
      	at com.liferay.portlet.exportimport.backgroundtask.LayoutStagingBackgroundTaskExecutor.execute(LayoutStagingBackgroundTaskExecutor.java:98)
      	at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:50)
      	at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:35)
      	at com.liferay.portal.kernel.backgroundtask.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:49)
      	at com.liferay.portal.backgroundtask.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:119)
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
      	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.exception.SystemException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
      	at com.liferay.portal.spring.hibernate.LastSessionRecorderUtil.syncLastSessionState(LastSessionRecorderUtil.java:53)
      	at com.liferay.portal.spring.hibernate.LastSessionRecorderHelperImpl.syncLastSessionState(LastSessionRecorderHelperImpl.java:27)
      	at com.liferay.portal.kernel.spring.orm.LastSessionRecorderHelperUtil.syncLastSessionState(LastSessionRecorderHelperUtil.java:25)
      	at com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:316)
      	at com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:299)
      	at com.liferay.asset.tags.admin.web.lar.AssetTagsPortletDataHandler.doImportData(AssetTagsPortletDataHandler.java:126)
      	at com.liferay.portlet.exportimport.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:371)
      	... 33 more
      Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
      	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
      	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
      	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
      	at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114)
      	at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)
      	at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)
      	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2412)
      	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2875)
      	at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
      	at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
      	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
      	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
      	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
      	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
      	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
      	at com.liferay.portal.spring.hibernate.LastSessionRecorderUtil.syncLastSessionState(LastSessionRecorderUtil.java:49)
      	... 39 more
      Caused by: java.sql.BatchUpdateException: Duplicate entry 'c9355be5-0ff4-d244-277f-a493f17206bc-20637' for key 'IX_B6ACB166'
      	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054)
      	at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
      	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:2465)
      	at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
      	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
      	... 52 more
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'c9355be5-0ff4-d244-277f-a493f17206bc-20637' for key 'IX_B6ACB166'
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
      	at com.mysql.jdbc.Util.getInstance(Util.java:386)
      	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
      	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
      	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
      	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
      	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
      	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458)
      	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
      	... 56 more
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 29 weeks, 2 days ago

                  Packages

                  Version Package
                  7.0.0 M7