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

Upgrade process is failing trying to alter a data type to VARCHAR in Oracle

    Details

      Description

      Altering column type to VARCHAR in Oracle in the following way:

      runSQL("alter_column_type DLFolder name VARCHAR(255) null");

      is failing in the upgrade process, this causes that a full creation of the table is launched and generating unexpected errors when the upgrade process continues.

      See Log:

      15:05:21,280 INFO  [localhost-startStop-1][UpgradeProcess:163] Upgrading com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary
      15:34:45,219 INFO  [localhost-startStop-1][Table:157] Starting backup of DLFolder to /home/jose/bundlesce/tomcat-7.0.62/temp/temp-db-DLFolder-1441035285219
      15:34:45,225 INFO  [localhost-startStop-1][Table:191] Finished backup of DLFolder to /home/jose/bundlesce/tomcat-7.0.62/temp/temp-db-DLFolder-1441035285219 in 6 ms
      15:35:29,604 INFO  [localhost-startStop-1][UpgradeProcess:173] Completed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary in 1808324ms
      15:35:29,608 INFO  [localhost-startStop-1][UpgradeProcess:163] Upgrading com.liferay.portal.upgrade.v7_0_0.UpgradeEmailAddress
      15:35:29,630 INFO  [localhost-startStop-1][UpgradeProcess:173] Completed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeEmailAddress in 22ms
      15:35:29,634 INFO  [localhost-startStop-1][UpgradeProcess:163] Upgrading com.liferay.portal.upgrade.v7_0_0.UpgradeEmailNotificationPreferences
      15:35:29,661 INFO  [localhost-startStop-1][UpgradeProcess:173] Completed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeEmailNotificationPreferences in 27ms
      15:35:29,666 INFO  [localhost-startStop-1][UpgradeProcess:163] Upgrading com.liferay.portal.upgrade.v7_0_0.UpgradeExpando
      15:35:29,675 INFO  [localhost-startStop-1][Table:157] Starting backup of ExpandoValue to /home/jose/bundlesce/tomcat-7.0.62/temp/temp-db-ExpandoValue-1441035329675
      15:35:29,682 INFO  [localhost-startStop-1][Table:191] Finished backup of ExpandoValue to /home/jose/bundlesce/tomcat-7.0.62/temp/temp-db-ExpandoValue-1441035329675 in 7 ms
      15:35:29,816 INFO  [localhost-startStop-1][UpgradeProcess:173] Completed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeExpando in 150ms
      15:35:29,820 INFO  [localhost-startStop-1][UpgradeProcess:163] Upgrading com.liferay.portal.upgrade.v7_0_0.UpgradeGroup
      15:35:29,858 INFO  [localhost-startStop-1][UpgradeProcess:173] Completed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeGroup in 37ms
      15:35:29,887 INFO  [localhost-startStop-1][UpgradeProcess:163] Upgrading com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate
      15:35:32,110 INFO  [localhost-startStop-1][UpgradeProcess:173] Completed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate in 2224ms
      15:35:32,378 INFO  [localhost-startStop-1][UpgradeProcess:173] Completed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 1813998ms
      15:35:33,032 ERROR [localhost-startStop-1][MainServlet:216] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: ORA-01430: column being added already exists in table_ [Sanitized]
      com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: ORA-01430: column being added already exists in table_ [Sanitized]
              at com.liferay.portal.events.StartupAction.run(StartupAction.java:78)
              at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1315)
              at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:213)
              at javax.servlet.GenericServlet.init(GenericServlet.java:158)
              at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5266)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5554)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
              at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677)
              at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1912)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
              at java.util.concurrent.FutureTask.run(FutureTask.java:262)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: ORA-01430: column being added already exists in table_ [Sanitized]
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:169)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:179)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:151)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:133)
              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:142)
              at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:138)
              at com.liferay.portal.events.StartupAction.run(StartupAction.java:72)
              ... 19 more
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: ORA-01430: column being added already exists in table_ [Sanitized]
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:169)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:191)
              at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:71)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:166)
              ... 27 more
      Caused by: java.sql.SQLException: ORA-01430: column being added already exists in table_ [Sanitized]
              at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
              at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
              at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
              at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
              at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
              at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
              at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
              at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1033)
              at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329)
              at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1838)
              at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1803)
              at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:294)
              at com.zaxxer.hikari.proxy.StatementProxy.executeUpdate(StatementProxy.java:119)
              at com.zaxxer.hikari.proxy.HikariStatementProxy.executeUpdate(HikariStatementProxy.java)
              at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:267)
              at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:289)
              at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:281)
              at com.liferay.portal.kernel.dao.db.BaseDBProcess.runSQL(BaseDBProcess.java:36)
              at com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate.upgradeDocumentLibrary(UpgradeLastPublishDate.java:76)
              at com.liferay.portal.upgrade.v7_0_0.UpgradeLastPublishDate.doUpgrade(UpgradeLastPublishDate.java:29)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:166)
              ... 30 more
      Stopping the server due to unexpected startup errors
      

      Steps to reproduce

      1. Start a portal v. 6.2.10 SP12.
      2. Once the data base is created, login in to the portal.
      3. Stop the server.
      4. Configure current master for the upgrade using the same Data Base and adding the next property to the portal-ext.properties:

      upgrade.processes.6210=${upgrade.processes.master}

      5. Start the server.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shitian.zhang Shitian "Shelton" Zhang (Inactive)
              Reporter:
              jose.jimenez Jose Jimenez
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 9 weeks, 1 day ago

                  Packages

                  Version Package
                  7.0.0 Alpha 1