Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-5278

Upgrade to Crowd 3.3.0 on MS SQL Server fails due to liquibase exception

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 3.3.2
    • 3.3.0
    • Upgrade
    • None

    Description

      Steps to reproduce

      1. Install any supported version of Crowd on Microsoft SQL Server;
      2. Attempt to upgrade to Crowd 3.3.0 using any available method (XML import or database);
      Expected results

      Upgrade completes successfully.

      Actual results

      The liquibase library queries the SYS.INDEXES object with uppercase, though it defaults to sys.indexes in lowecase in MSSQL.

      Therefore, the upgrade fails and the following error appears in the application logs:

      2018-10-03 10:01:33,066 localhost-startStop-1 ERROR [crowd.console.listener.StartupListener] Failed to initialise Crowd container
      java.lang.RuntimeException: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase/bootstrap/06_cwd_user.xml::EMBCWD-300: drop idx_user_lower_display_name before mutating constraints::crowd:
           Reason: 
                liquibase/master.xml : Index Exists Precondition: idx_user_lower_display_name on cwd_user : Invalid object name 'SYS.INDEXES'.
      
      ...
      
      Caused by: java.sql.SQLException: Invalid object name 'SYS.INDEXES'.
          at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
          at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
          at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
          at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
          at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:505)
          at net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1427)
      

      Workaround

      Rename the affected objects to match the uppercase query.

      Or upgrade to 3.2.5 instead.

      Attachments

        Issue Links

          Activity

            People

              mmakowski Mareusz (Inactive)
              lmachado@atlassian.com Lucas Machado (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: