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

Journal fails to upgrade class name due to duplicate entry in ClassName_ table

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 7.0.1 CE GA2
    • Fix Version/s: 7.0.1 CE GA2
    • Component/s: WCM, WCM > Upgrade
    • Labels:
      None

      Description

      Journal fails to upgrade class name due to duplicate entry in ClassName_ table.
      Upgrade portal using DB attached to WCM-707.

      Expected result: upgrade without errors.
      Actual result:

      INFO - Upgrading com.liferay.journal.upgrade.v0_0_2.UpgradeClassNames
      07:41:19,948 INFO  [main][LoggingTimer:70] Starting com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage#upgradeTable#Counter
      INFO - Starting com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage#upgradeTable#Counter
      07:41:19,948 INFO  [main][LoggingTimer:38] Completed com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage#upgradeTable#Counter in 0 ms
      INFO - Completed com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage#upgradeTable#Counter in 0 ms
      07:41:19,948 INFO  [main][LoggingTimer:70] Starting com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage#upgradeTable#ClassName_
      INFO - Starting com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage#upgradeTable#ClassName_
      07:41:19,950 INFO  [main][LoggingTimer:38] Completed com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage#upgradeTable#ClassName_ in 2 ms
      INFO - Completed com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage#upgradeTable#ClassName_ in 2 ms
      07:41:19,950 INFO  [main][UpgradeProcess:97] Completed upgrade process com.liferay.journal.upgrade.v0_0_2.UpgradeClassNames in 3ms
      INFO - Completed upgrade process com.liferay.journal.upgrade.v0_0_2.UpgradeClassNames in 3ms
      07:41:19,952 ERROR [main][com_liferay_portal_upgrade:97] Invocation to listener threw exception 
      java.lang.RuntimeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'com.liferay.journal.model.JournalArticle' for key 'IX_B27A301F'
      	at com.liferay.portal.upgrade.internal.release.ReleaseManager$UpgradeInfosRunnable.run(ReleaseManager.java:402)
      	at com.liferay.portal.output.stream.container.OutputStreamContainerFactoryTracker.runWithSwappedLog(OutputStreamContainerFactoryTracker.java:100)
      	at com.liferay.portal.upgrade.internal.release.ReleaseManager.executeUpgradeInfos(ReleaseManager.java:241)
      	at com.liferay.portal.upgrade.internal.release.ReleaseManager.doExecute(ReleaseManager.java:225)
      	at com.liferay.portal.upgrade.internal.release.ReleaseManager$UpgradeInfoServiceTrackerMapListener.keyEmitted(ReleaseManager.java:352)
      	at com.liferay.portal.upgrade.internal.release.ReleaseManager$UpgradeInfoServiceTrackerMapListener.keyEmitted(ReleaseManager.java:342)
      	at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl$DefaultEmitter.emit(ServiceTrackerMapImpl.java:222)
      	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:261)
      	at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl$ServiceReferenceServiceTrackerCustomizer.addingService(ServiceTrackerMapImpl.java:248)
      	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.track(AbstractTracked.java:229)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
      	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.portal.upgrade.registry.UpgradeStepRegistratorTracker._register(UpgradeStepRegistratorTracker.java:154)
      	at com.liferay.portal.upgrade.registry.UpgradeStepRegistratorTracker.access$200(UpgradeStepRegistratorTracker.java:44)
      	at com.liferay.portal.upgrade.registry.UpgradeStepRegistratorTracker$UpgradeStepRegistratorServiceTrackerCustomizer$UpgradeStepRegistry.register(UpgradeStepRegistratorTracker.java:230)
      	at com.liferay.journal.upgrade.JournalServiceUpgrade.register(JournalServiceUpgrade.java:63)
      	at com.liferay.portal.upgrade.registry.UpgradeStepRegistratorTracker$UpgradeStepRegistratorServiceTrackerCustomizer.addingService(UpgradeStepRegistratorTracker.java:182)
      	at com.liferay.portal.upgrade.registry.UpgradeStepRegistratorTracker$UpgradeStepRegistratorServiceTrackerCustomizer.addingService(UpgradeStepRegistratorTracker.java:163)
      	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.track(AbstractTracked.java:229)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
      	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:869)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:857)
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:133)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:915)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:715)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:954)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:915)
      	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:120)
      	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 com.liferay.portal.spring.extender.internal.bean.ApplicationContextServicePublisher.registerService(ApplicationContextServicePublisher.java:229)
      	at com.liferay.portal.spring.extender.internal.bean.ApplicationContextServicePublisher.registerService(ApplicationContextServicePublisher.java:221)
      	at com.liferay.portal.spring.extender.internal.bean.ApplicationContextServicePublisher.register(ApplicationContextServicePublisher.java:74)
      	at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextRegistrator.start(ModuleApplicationContextRegistrator.java:79)
      	at sun.reflect.GeneratedMethodAccessor388.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.felix.dm.InvocationUtil.invokeMethod(InvocationUtil.java:111)
      	at org.apache.felix.dm.InvocationUtil.invokeCallbackMethod(InvocationUtil.java:66)
      	at org.apache.felix.dm.impl.ComponentImpl.invokeCallbackMethod(ComponentImpl.java:769)
      	at org.apache.felix.dm.impl.ComponentImpl.invoke(ComponentImpl.java:760)
      	at org.apache.felix.dm.impl.ComponentImpl.bindService(ComponentImpl.java:705)
      	at org.apache.felix.dm.impl.ComponentImpl.access$400(ComponentImpl.java:54)
      	at org.apache.felix.dm.impl.ComponentImpl$7.run(ComponentImpl.java:202)
      	at org.apache.felix.dm.impl.SerialExecutor.runTask(SerialExecutor.java:137)
      	at org.apache.felix.dm.impl.SerialExecutor.runTasks(SerialExecutor.java:119)
      	at org.apache.felix.dm.impl.SerialExecutor.execute(SerialExecutor.java:85)
      	at org.apache.felix.dm.impl.ComponentImpl.calculateStateChanges(ComponentImpl.java:252)
      	at org.apache.felix.dm.impl.ComponentImpl.start(ComponentImpl.java:440)
      	at org.apache.felix.dm.DependencyManager.add(DependencyManager.java:167)
      	at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextExtender$ModuleApplicationContextExtension.start(ModuleApplicationContextExtender.java:223)
      	at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
      	at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
      	at org.apache.felix.utils.extender.AbstractExtender.addingBundle(AbstractExtender.java:192)
      	at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
      	at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.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.BundleTracker.open(BundleTracker.java:156)
      	at org.apache.felix.utils.extender.AbstractExtender.startTracking(AbstractExtender.java:150)
      	at org.apache.felix.utils.extender.AbstractExtender.doStart(AbstractExtender.java:142)
      	at org.apache.felix.utils.extender.AbstractExtender.start(AbstractExtender.java:114)
      	at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextExtender.activate(ModuleApplicationContextExtender.java:75)
      	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.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
      	at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
      	at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
      	at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
      	at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:724)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:954)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:915)
      	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:120)
      	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:301)
      	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: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'com.liferay.journal.model.JournalArticle' for key 'IX_B27A301F'
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:91)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:122)
      	at com.liferay.portal.upgrade.internal.release.ReleaseManager$UpgradeInfosRunnable.run(ReleaseManager.java:381)
      	... 136 more
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'com.liferay.journal.model.JournalArticle' for key 'IX_B27A301F'
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage.doUpgrade(UpgradeKernelPackage.java:76)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
      	... 138 more
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'com.liferay.journal.model.JournalArticle' for key 'IX_B27A301F'
      	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:2788)
      	at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1816)
      	at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1730)
      	at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:291)
      	at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:261)
      	at com.liferay.portal.kernel.dao.db.BaseDBProcess.runSQL(BaseDBProcess.java:52)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage.upgradeTable(UpgradeKernelPackage.java:225)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeKernelPackage.doUpgrade(UpgradeKernelPackage.java:43)
      	... 139 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                joyce.wang Joyce Wang
                Reporter:
                pavel.savinov Pavel Savinov
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 48 weeks, 5 days ago