掲示板

Upgrading from 6.0 sp1 to 6.2 ee fails with Duplicate entry exception

thumbnail
7年前 に Robert Smith によって更新されました。

Upgrading from 6.0 sp1 to 6.2 ee fails with Duplicate entry exception

Junior Member 投稿: 63 参加年月日: 09/10/15 最新の投稿
I have been working to get an upgrade from 6.0 EE SP1 to 6.2 EE SP14 completed.
The latest problem we have been encountering is the an exception while upgrading PortletPreferences to v6.0.12. Does anyone have any ideas on what can cause it? Looking at the upgrade code, for each entry in PortletPreferences with a portletId = 'LIFERAY_PORTAL' a call to insert a new PortalPreference is made.

Stack trace follows:

23:43:02,121 INFO [stdout] (MSC service thread 1-4) 23:43:02,121 INFO [MSC service thread 1-4][UpgradeProcess:164] Upgrading com.liferay.portal.upgrade.v6_0_12.UpgradePortletPreferences
23:43:02,167 INFO [stdout] (MSC service thread 1-4) 23:43:02,160 ERROR [MSC service thread 1-4][MainServlet:233] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '4871802' for key 'PRIMARY'
23:43:02,169 INFO [stdout] (MSC service thread 1-4) com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '4871802' for key 'PRIMARY'
23:43:02,170 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.events.StartupAction.run(StartupAction.java:81)
23:43:02,171 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1249)
23:43:02,171 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:230)
23:43:02,172 INFO [stdout] (MSC service thread 1-4) at javax.servlet.GenericServlet.init(GenericServlet.java:242)
23:43:02,172 INFO [stdout] (MSC service thread 1-4) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202)
23:43:02,173 INFO [stdout] (MSC service thread 1-4) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102)
23:43:02,174 INFO [stdout] (MSC service thread 1-4) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655)
23:43:02,174 INFO [stdout] (MSC service thread 1-4) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873)
23:43:02,175 INFO [stdout] (MSC service thread 1-4) at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)
23:43:02,175 INFO [stdout] (MSC service thread 1-4) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
23:43:02,176 INFO [stdout] (MSC service thread 1-4) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
23:43:02,177 INFO [stdout] (MSC service thread 1-4) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
23:43:02,177 INFO [stdout] (MSC service thread 1-4) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
23:43:02,178 INFO [stdout] (MSC service thread 1-4) at java.lang.Thread.run(Thread.java:745)
23:43:02,178 INFO [stdout] (MSC service thread 1-4) Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '4871802' for key 'PRIMARY'
23:43:02,180 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:170)
23:43:02,180 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.upgrade.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:167)
23:43:02,181 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:115)
23:43:02,181 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:95)
23:43:02,182 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:138)
23:43:02,182 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:61)
23:43:02,183 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:143)
23:43:02,183 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:182)
23:43:02,184 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.ee.license.StartupAction.doRun(Unknown Source)
23:43:02,184 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.events.StartupAction.run(StartupAction.java:75)
23:43:02,185 INFO [stdout] (MSC service thread 1-4) ... 13 more
23:43:02,185 INFO [stdout] (MSC service thread 1-4) Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '4871802' for key 'PRIMARY'
23:43:02,186 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:170)
23:43:02,186 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:184)
23:43:02,187 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.upgrade.UpgradeProcess_6_0_12.doUpgrade(UpgradeProcess_6_0_12.java:55)
23:43:02,187 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:167)
23:43:02,188 INFO [stdout] (MSC service thread 1-4) ... 22 more
23:43:02,188 INFO [stdout] (MSC service thread 1-4) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '4871802' for key 'PRIMARY'
23:43:02,189 INFO [stdout] (MSC service thread 1-4) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
23:43:02,189 INFO [stdout] (MSC service thread 1-4) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
23:43:02,190 INFO [stdout] (MSC service thread 1-4) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
23:43:02,191 INFO [stdout] (MSC service thread 1-4) at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
23:43:02,191 INFO [stdout] (MSC service thread 1-4) at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
23:43:02,192 INFO [stdout] (MSC service thread 1-4) at com.mysql.jdbc.Util.getInstance(Util.java:387)
23:43:02,192 INFO [stdout] (MSC service thread 1-4) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:934)
23:43:02,193 INFO [stdout] (MSC service thread 1-4) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
23:43:02,193 INFO [stdout] (MSC service thread 1-4) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
23:43:02,194 INFO [stdout] (MSC service thread 1-4) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
23:43:02,194 INFO [stdout] (MSC service thread 1-4) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
23:43:02,194 INFO [stdout] (MSC service thread 1-4) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2550)
23:43:02,195 INFO [stdout] (MSC service thread 1-4) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
23:43:02,195 INFO [stdout] (MSC service thread 1-4) at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)
23:43:02,196 INFO [stdout] (MSC service thread 1-4) at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009)
23:43:02,197 INFO [stdout] (MSC service thread 1-4) at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5094)
23:43:02,197 INFO [stdout] (MSC service thread 1-4) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1994)
23:43:02,197 INFO [stdout] (MSC service thread 1-4) at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.executeUpdate(CachedPreparedStatement.java:115)
23:43:02,198 INFO [stdout] (MSC service thread 1-4) at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)
23:43:02,198 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.upgrade.v6_0_12.UpgradePortletPreferences.addPortalPreferences(UpgradePortletPreferences.java:50)
23:43:02,199 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.upgrade.v6_0_12.UpgradePortletPreferences.updatePortalPreferences(UpgradePortletPreferences.java:172)
23:43:02,199 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.upgrade.v6_0_12.UpgradePortletPreferences.doUpgrade(UpgradePortletPreferences.java:89)
23:43:02,200 INFO [stdout] (MSC service thread 1-4) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:167)
23:43:02,200 INFO [stdout] (MSC service thread 1-4) ... 25 more
23:43:02,201 INFO [stdout] (MSC service thread 1-4) Stopping the server due to unexpected startup errors
23:43:02,227 INFO [org.jboss.as.osgi] (MSC service thread 1-3) JBAS011942: Stopping OSGi Framework
thumbnail
7年前 に Robert Smith によって更新されました。

RE: Upgrading from 6.0 sp1 to 6.2 ee fails with Duplicate entry exception

Junior Member 投稿: 63 参加年月日: 09/10/15 最新の投稿
We are retrying to see if we get past the Duplicate error.
After looking through the code and at corresponding tables I found that the Counter table entry for com.liferay.counter.model.Counter had a number that was lower than entries in the PortalPreferences table (not sure how that would happen)