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

Unable to upgrade module com.liferay.journal.content.search.web because duplicate entry for key IX_C3AA93B8

    Details

      Description

      If you upgraded from 6.x to DXP before fix pack 16 and the you installed this fix pack or higher, you can reproduce this issue.

      Steps to reproduce in master:

      1. Start up clean 6210
      2. Add a web content display and web content search portlet to the page
      3. Add a web content article "6.2 web content" and select that web content in the previous web content display.
      4. Upgrade to Master just before the commits of the issue LPS-72287 (maybe there are a few minor errors, it's ok if you can startup the server)
      5. Startup the server
      6. Create a new web content "dxp web content"
      7. In the web content diplay, go to configuration, select the article "dxp web content" and Save
      8. In the web content diplay, go to configuration, select the article "6.2 web content" and Save
      9. Restart the server installing latest master first.

      Steps to reproduce in ee-7.0.x:

      1. Start up clean 6210
      2. Add a web content display and web content search portlet to the page
      3. Add a web content article "6.2 web content"
      4. Upgrade to DXP FP 15
      5. Startup the server
      6. Create a new web content "dxp web content"
      7. In the web content diplay, go to configuration, select the article "dxp web content" and Save
      8. In the web content diplay, go to configuration, select the article "6.2 web content" and Save
      9. Restart the server installing ee-7.0.x first

      Results:
      You will get the following exception:

      08:16:24,995 INFO  [main][UpgradeProcess:99] Completed upgrade process com.liferay.journal.content.search.web.internal.upgrade.v1_0_1.UpgradePortletId in 58292ms
      INFO - Completed upgrade process com.liferay.journal.content.search.web.internal.upgrade.v1_0_1.UpgradePortletId in 58292ms
      08:16:25,004 ERROR [main][com_liferay_portal_upgrade:97] Invocation to listener threw exception 
      java.lang.RuntimeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.BatchUpdateException: Duplicate entry '20182-0-1-com_liferay_journal_content_web_portlet_JournalContent' for key 'IX_C3AA93B8'
              at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfosRunnable.run(ReleaseManagerOSGiCommands.java:491)
              at com.liferay.portal.output.stream.container.OutputStreamContainerFactoryTracker.runWithSwappedLog(OutputStreamContainerFactoryTracker.java:100)
              at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.executeUpgradeInfos(ReleaseManagerOSGiCommands.java:295)
              at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.doExecute(ReleaseManagerOSGiCommands.java:251)
              at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfoServiceTrackerMapListener.keyEmitted(ReleaseManagerOSGiCommands.java:441)
              at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfoServiceTrackerMapListener.keyEmitted(ReleaseManagerOSGiCommands.java:431)
              at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl$DefaultEmitter.emit(ServiceTrackerMapImpl.java:225)
              at com.liferay.osgi.service.tracker.collections.map.PropertyServiceReferenceMapper.map(PropertyServiceReferenceMapper.java:43)
              at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl$ServiceReferenceServiceTrackerCustomizer.addingService(ServiceTrackerMapImpl.java:264)
              at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl$ServiceReferenceServiceTrackerCustomizer.addingService(ServiceTrackerMapImpl.java:251)
              at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
              at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
              at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
              at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
              at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
              at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
              at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl.open(ServiceTrackerMapImpl.java:94)
              at com.liferay.osgi.service.tracker.collections.map.ServiceTrackerMapFactory.openMultiValueMap(ServiceTrackerMapFactory.java:244)
              at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.activate(ReleaseManagerOSGiCommands.java:214)
              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 org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:224)
              at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39)
              at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:617)
              at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:501)
              at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:302)
              at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:294)
              at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:297)
              at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:108)
              at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:906)
              at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:879)
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:748)
              at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1012)
              at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:968)
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)
              at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)
              at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)
              at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:127)
              at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
              at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:917)
              at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
              at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
              at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
              at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:886)
              at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:873)
              at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:132)
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:940)
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:740)
              at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1012)
              at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:968)
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)
              at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)
              at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)
              at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:127)
              at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
              at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:917)
              at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
              at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
              at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
              at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
              at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1001)
              at com.liferay.registry.internal.RegistryImpl.registerService(RegistryImpl.java:305)
              at com.liferay.portal.tools.DBUpgrader._registerModuleServiceLifecycle(DBUpgrader.java:410)
              at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:106)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.BatchUpdateException: Duplicate entry '20182-0-1-com_liferay_journal_content_web_portlet_JournalContent' for key 'IX_C3AA93B8'
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:93)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:124)
              at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfosRunnable.run(ReleaseManagerOSGiCommands.java:470)
              ... 77 more
      Caused by: java.sql.BatchUpdateException: Duplicate entry '20182-0-1-com_liferay_journal_content_web_portlet_JournalContent' for key 'IX_C3AA93B8'
              at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054)
              at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
              at com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:128)
              at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java)
              at com.liferay.portal.kernel.dao.jdbc.AutoBatchPreparedStatementUtil$ConcurrentBatchInvocationHandler$1.call(AutoBatchPreparedStatementUtil.java:218)
              at com.liferay.portal.kernel.dao.jdbc.AutoBatchPreparedStatementUtil$ConcurrentBatchInvocationHandler$1.call(AutoBatchPreparedStatementUtil.java:213)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              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.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '20182-0-1-com_liferay_journal_content_web_portlet_JournalContent' for key 'IX_C3AA93B8'
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
              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)
              ... 9 more
      

      If you connect to Gogo Shell and execute upgrade:check it will return that there is a pending ugrade for com.liferay.journal.content.search.web

      Expected results:
      No exceptions, no pending upgrades executing upgrade:check, the following query:

      SELECT schemaVersion FROM Release_ where servletContextName = 'com.liferay.journal.content.search.web'
      

      should return 1.0.1

      Tests in master:
      This issue is reproducible in master but changing the code to be able to upgrade from 7010 to master. We need to apply the fix to master but QA won't able to test it until we create a way to upgrade to master from 7010.

       

        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:
                  1 year, 40 weeks ago