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

Upgrading from 6.2 to 7.0 with JBOSS EAP fails with SQLException

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 7.0.X
    • Fix Version/s: None
    • Labels:
      None

      Description

      Reproduction steps:
      1) Create a new database and start 6.2 with that database
      2) Have jboss-eap-6.4.0 installed with Liferay
      3) Configure upgrade tool's properties with the above mentioned database
      4) Start upgrade tool: java -jar com.liferay.portal.tools.db.upgrade.client.jar -j "-Xmx4096m"
      Result: Upgrade fails with exception:
      MySQL:

      2018-03-26 17:17:30.503 INFO  [main][LoggingTimer:72] Starting com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary#updateFileEntryFileNames
      2018-03-26 17:17:30.504 INFO  [main][LoggingTimer:38] Completed com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary#updateFileEntryFileNames in 1 ms
      2018-03-26 17:17:30.505 INFO  [main][UpgradeProcess:103] Failed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary in 3ms
      2018-03-26 17:17:30.505 INFO  [main][UpgradeProcess:103] Failed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 3587ms
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'fileName'
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:97)
              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:171)
              at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
              at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:155)
              at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:101)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:55)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'fileName'
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:97)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:122)
              at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:77)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:92)
              ... 12 more
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name 'fileName'
              at sun.reflect.GeneratedConstructorAccessor48.newInstance(Unknown Source)
              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.zaxxer.hikari.pool.ProxyStatement.executeUpdate(ProxyStatement.java:120)
              at com.zaxxer.hikari.pool.HikariProxyStatement.executeUpdate(HikariProxyStatement.java)
              at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:295)
              at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:264)
              at com.liferay.portal.kernel.dao.db.BaseDBProcess.runSQL(BaseDBProcess.java:66)
              at com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary.updateFileEntryFileNames(UpgradeDocumentLibrary.java:163)
              at com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary.doUpgrade(UpgradeDocumentLibrary.java:99)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:92)
      

      Oracle:

      2018-03-26 17:24:53.730 INFO  [main][UpgradeProcess:86] Upgrading com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary
      2018-03-26 17:24:53.730 INFO  [main][LoggingTimer:72] Starting com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary#updateFileEntryFileNames
      2018-03-26 17:24:53.842 INFO  [main][LoggingTimer:38] Completed com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary#updateFileEntryFileNames in 112 ms
      2018-03-26 17:24:53.843 INFO  [main][UpgradeProcess:103] Failed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary in 113ms
      2018-03-26 17:24:53.843 INFO  [main][UpgradeProcess:103] Failed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 8093ms
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: ORA-01430: column being added already exists in table
      
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:97)
              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:171)
              at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
              at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:155)
              at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:101)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:55)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: ORA-01430: column being added already exists in table
      
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:97)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:122)
              at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:77)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:92)
              ... 12 more
      Caused by: java.sql.SQLException: ORA-01430: column being added already exists in table
      
              at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
              at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
              at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1017)
              at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:655)
              at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:249)
              at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:566)
              at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:202)
              at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:45)
              at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:933)
              at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1075)
              at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1640)
              at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1603)
              at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:308)
              at com.zaxxer.hikari.pool.ProxyStatement.executeUpdate(ProxyStatement.java:120)
              at com.zaxxer.hikari.pool.HikariProxyStatement.executeUpdate(HikariProxyStatement.java)
              at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:295)
              at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:264)
              at com.liferay.portal.kernel.dao.db.BaseDBProcess.runSQL(BaseDBProcess.java:66)
              at com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary.updateFileEntryFileNames(UpgradeDocumentLibrary.java:163)
              at com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary.doUpgrade(UpgradeDocumentLibrary.java:99)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:92)
              ... 15 more
      

      Info:
      It's not reproducible with Tomcat and wildfly

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            tibor.jandi Tibor Jandi
            Participants of an Issue:
            Recent user:
            Marta Elicegui
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              3 years, 43 weeks, 2 days ago

                Packages

                Version Package