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

When a table alter fails, the reason why isn't displayed

    Details

    • Fix Priority:
      3
    • Databases:
      SQL Server 2008 R2

      Description

      I see errors like:

      16:02:27,436 WARN  [main][UpgradeProcess:347] Fallback to recreating the table
      com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'column'.
      	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:792)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:689)
      	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
      	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(SQLServerStatement.java:642)
      	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:60)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.alter(UpgradeProcess.java:318)
      	at com.liferay.portal.upgrade.v6_2_0.UpgradeDynamicDataMapping.updateSchema(UpgradeDynamicDataMapping.java:79)
      	at com.liferay.portal.upgrade.v6_2_0.UpgradeDynamicDataMapping.doUpgrade(UpgradeDynamicDataMapping.java:47)
      	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_6_2_0.doUpgrade(UpgradeProcess_6_2_0.java:72)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
      	at com.liferay.portal.upgrade.Pre7UpgradeProcess.upgrade(Pre7UpgradeProcess.java:42)
      	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)
      

      Which doesn't really fully explain the failure. I added a little more logging which helps, but we should log at the alter with the actual SQL used to see why exactly it failed.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 38 weeks ago

                Packages

                Version Package
                7.0.1 CE GA2