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

ClassCastExceptions and unsupported class type errors thrown on SQL server upgrade

    Details

      Description

      When document library entries are added to the database, DLFileEntryVersionUpgradeColumnImpl in the 6.0.0 upgrade throws an exception because the default type is NULL, which causes it to retrieve a STRING even though it can sometimes be a DOUBLE. While this is not a problem on most servers, the new code to handle SQL Server upgrades is sensitive to the actual type. Should update this code to be less sensitive to the actual database type to avoid making upgrades too brittle.

      If a date is null, StringPool.NULL will be passed to DateUpgradeColumnImpl.getNewValue(), resulting in a ClassCastException because it assumes that all values passed to the method will be dates.

      Some SQL Server databases throw an "Upgrade code using unsupported class type 2" exception, which corresponds to the NUMERIC type. Need to add support for NUMERIC type for upgrade process. Only instance of this so far was the for a BIGINT column, so using that as the assumption for what it usually means.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.saechang Michael Saechang
              Reporter:
              minhchau.dang Minhchau Dang
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                8 years, 50 weeks, 1 day ago

                  Packages

                  Version Package
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  6.2.0 CE M2