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

Conversion Exception Breaks on DLFileEntry Table in Sybase

    Details

      Description

      When attempting to upgrade a Sybase DB from 6.2 or below to master, a conversion error is thrown.  This is because of the changes from LPS-91476, where we are trying to convert a DECIMAL type value to VARCHAR.

      Steps to reproduce:

      1. Start a 6.2 instance on Sybase 16
      2. Once initial tables have been created and portal is loaded, shutdown.
      3. Using the upgrade tool, upgrade to master, specifically after the inclusion of LPS-91476

      Expected Results: Upgrade works properly

      Actual results: Upgrade fails with the following stacktrace:

      2019-04-05 00:45:45.311 INFO [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary in 2 ms
      2019-04-05 00:45:45.311 INFO [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 1809 ms
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.sybase.jdbc4.jdbc.SybSQLException: Implicit conversion from datatype 'VARCHAR' to 'DECIMAL' is not allowed. Use the CONVERT function to run this query.
      
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
      at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:176)
      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:151)
      at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:85)
      at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:174)
      at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:107)
      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.sybase.jdbc4.jdbc.SybSQLException: Implicit conversion from datatype 'VARCHAR' to 'DECIMAL' is not allowed. Use the CONVERT function to run this query.
      
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:142)
      at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:86)
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
      ... 12 more
      Caused by: com.sybase.jdbc4.jdbc.SybSQLException: Implicit conversion from datatype 'VARCHAR' to 'DECIMAL' is not allowed. Use the CONVERT function to run this query.
      
      at com.sybase.jdbc4.tds.Tds.processEed(Tds.java:4117)
      at com.sybase.jdbc4.tds.Tds.nextResult(Tds.java:3207)
      at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(ResultGetter.java:78)
      at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:293)
      at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:275)
      at com.sybase.jdbc4.jdbc.SybStatement.updateLoop(SybStatement.java:2748)
      at com.sybase.jdbc4.jdbc.SybStatement.executeUpdate(SybStatement.java:2732)
      at com.sybase.jdbc4.jdbc.SybStatement.executeUpdate(SybStatement.java:587)
      at com.zaxxer.hikari.pool.ProxyStatement.executeUpdate(ProxyStatement.java:117)
      at com.zaxxer.hikari.pool.HikariProxyStatement.executeUpdate(HikariProxyStatement.java)
      at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:344)
      at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:310)
      at com.liferay.portal.kernel.dao.db.BaseDBProcess.runSQL(BaseDBProcess.java:66)
      at com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary._populateEmptyTitles(UpgradeDocumentLibrary.java:561)
      at com.liferay.portal.upgrade.v7_0_0.UpgradeDocumentLibrary.doUpgrade(UpgradeDocumentLibrary.java:99)
      at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
      ... 15 more

      Reproduced in master e9177b12ad94b45b8f4e4b92c733c93c1e970610

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yvonne.han Yvonne Han
              Reporter:
              christopher.kian Christopher Kian
              Participants of an Issue:
              Recent user:
              Clarissa Velazquez
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 26 weeks, 1 day ago

                  Packages

                  Version Package
                  7.0.0 DXP FP82
                  7.0.X
                  7.1.10 DXP FP12
                  7.1.X
                  Master