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

Upgrade from version 5.2.3 fails with error java.sql.SQLException: Cannot insert duplicate key row in object 'dbo.DLFileVersion' with unique index

    Details

      Description

      Upgrade failed with following exception (see below). It could be the error in the upgrade algorithm, located nearly
      com.liferay.portal.upgrade.v6_0_0.UpgradeDocumentLibrary.doUpgrade(UpgradeDocumentLibrary.java:139).
      Stack trace is:

      11:55:03,053 INFO  [DialectDetector:80] Determine dialect for Microsoft SQL Server 9
      11:55:03,084 INFO  [DialectDetector:145] Found dialect com.liferay.portal.dao.orm.hibernate.SQLServer2005Dialect
      11:55:20,397 ERROR [JDBCExceptionReporter:75] Invalid object name 'Lock_'.
      11:55:20,960 INFO  [BaseDB:409] Database does not support case sensitive queries
      11:55:21,116 INFO  [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.UpgradeProcess_6_0_0
      11:55:21,116 INFO  [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_0_0.UpgradeSchema
      11:55:21,679 INFO  [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_0_0.UpgradeAsset
      11:55:25,335 INFO  [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_0_0.UpgradeAssetPublisher
      11:55:26,147 INFO  [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_0_0.UpgradeBlogs
      11:55:26,163 INFO  [Table:171] Starting backup of BlogsEntry to D:\Liferay6\tomcat-7.0.23\temp/temp-db-BlogsEntry-1327406126163
      11:55:26,554 INFO  [Table:207] Finished backup of BlogsEntry to D:\Liferay6\tomcat-7.0.23\temp/temp-db-BlogsEntry-1327406126163 in 391 ms
      11:55:26,866 INFO  [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_0_0.UpgradeDocumentLibrary
      11:55:27,163 ERROR [MainServlet:198] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Cannot insert duplicate key row in object 'dbo.DLFileVersion' with unique index 'IX_6C5E6512'.
      com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Cannot insert duplicate key row in object 'dbo.DLFileVersion' with unique index 'IX_6C5E6512'.
      	at com.liferay.portal.events.StartupAction.run(StartupAction.java:58)
      	at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1267)
      	at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:195)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:160)
      	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
      	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
      	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
      	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5001)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
      	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
      	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:619)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Cannot insert duplicate key row in object 'dbo.DLFileVersion' with unique index 'IX_6C5E6512'.
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:211)
      	at com.liferay.portal.upgrade.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:93)
      	at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:46)
      	at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:81)
      	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:40)
      	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:119)
      	at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:144)
      	at com.liferay.portal.events.StartupAction.run(StartupAction.java:52)
      	... 20 more
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Cannot insert duplicate key row in object 'dbo.DLFileVersion' with unique index 'IX_6C5E6512'.
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:211)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:225)
      	at com.liferay.portal.upgrade.UpgradeProcess_6_0_0.doUpgrade(UpgradeProcess_6_0_0.java:50)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:208)
      	... 27 more
      Caused by: java.sql.SQLException: Cannot insert duplicate key row in object 'dbo.DLFileVersion' with unique index 'IX_6C5E6512'.
      	at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
      	at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
      	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
      	at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)
      	at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
      	at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
      	at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:504)
      	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
      	at com.liferay.portal.upgrade.v6_0_0.UpgradeDocumentLibrary.addFileVersion(UpgradeDocumentLibrary.java:88)
      	at com.liferay.portal.upgrade.v6_0_0.UpgradeDocumentLibrary.doUpgrade(UpgradeDocumentLibrary.java:139)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:208)
      	... 30 more
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  7 years, 40 weeks, 5 days ago

                  Packages

                  Version Package
                  6.1.10 EE GA1
                  6.1.20 EE GA2
                  --Sprint 11/12
                  6.2.0 CE M2