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

MySQLSyntaxErrorException: Table 'classname_' already exists during sharding upgrade

    Details

      Description

      During the upgrade process, the following errors occur during the upgrade process. Checking the tables in the second and third shard pre-upgrade, the 'classname_' table does exist but are empty.

      22:08:45,338 INFO  [main][LoggingTimer:70] Starting com.liferay.portal.upgrade.v7_0_0.UpgradeSharding#copyControlTables
      22:08:45,389 INFO  [main][Table:166] Starting backup of ClassName_ to /var/folders/dv/jjdgk4dd3jd88c_wkwjmgmw40000gn/T/temp-db-ClassName_-6632674460474519978.tmp
      22:08:45,392 INFO  [main][Table:200] Finished backup of ClassName_ to /var/folders/dv/jjdgk4dd3jd88c_wkwjmgmw40000gn/T/temp-db-ClassName_-6632674460474519978.tmp in 3 ms
      22:08:45,414 ERROR [main][UpgradeSharding:136] Unable to copy control tables
      com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'classname_' already exists
      	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:1053)
      	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.upgrade.util.BaseUpgradeTableImpl.updateTable(BaseUpgradeTableImpl.java:114)
      	at com.liferay.portal.upgrade.util.DefaultUpgradeTableImpl.copyTable(DefaultUpgradeTableImpl.java:43)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTable(UpgradeSharding.java:62)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTables(UpgradeSharding.java:99)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTables(UpgradeSharding.java:84)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.doUpgrade(UpgradeSharding.java:148)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:115)
      	at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:100)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:175)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:143)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:125)
      	at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:164)
      	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
      	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:158)
      	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:96)
      22:08:45,461 INFO  [main][Table:166] Starting backup of ClassName_ to /var/folders/dv/jjdgk4dd3jd88c_wkwjmgmw40000gn/T/temp-db-ClassName_-2967273727953401105.tmp
      22:08:45,463 INFO  [main][Table:200] Finished backup of ClassName_ to /var/folders/dv/jjdgk4dd3jd88c_wkwjmgmw40000gn/T/temp-db-ClassName_-2967273727953401105.tmp in 2 ms
      22:08:45,484 ERROR [main][UpgradeSharding:136] Unable to copy control tables
      com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'classname_' already exists
      	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:1053)
      	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.upgrade.util.BaseUpgradeTableImpl.updateTable(BaseUpgradeTableImpl.java:114)
      	at com.liferay.portal.upgrade.util.DefaultUpgradeTableImpl.copyTable(DefaultUpgradeTableImpl.java:43)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTable(UpgradeSharding.java:62)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTables(UpgradeSharding.java:99)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.copyControlTables(UpgradeSharding.java:84)
      	at com.liferay.portal.upgrade.v7_0_0.UpgradeSharding.doUpgrade(UpgradeSharding.java:148)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:115)
      	at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:100)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:175)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:143)
      	at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:125)
      	at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:164)
      	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
      	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:158)
      	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:96)
      

        Attachments

          Activity

            People

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

              Dates

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

                Packages

                Version Package
                7.0.1 CE GA2