Uploaded image for project: 'Crucible'
  1. Crucible
  2. CRUC-7635

Backup for instances using SQL Server fails with the message 'Cannot encode value for unsupported column type: "bit" (-7) of column .cru_fisheye_user'

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 4.0.3
    • 4.0.0, 4.0.1
    • None

    Description

      Users running FishEye/Crucible 4.0.0 or 4.0.1 with MS SQL Server will encounter the following error, when trying to perform a backup:

      2016-03-21 10:25:19,952 WARN  - Backup failed.
      java.io.IOException: Error reading database: Cannot encode value for unsupported column type: "bit" (-7) of column .cru_fisheye_user
      	at com.atlassian.crucible.migration.item.SQLBackup$SaverImpl.backup(SQLBackup.java:82) [fisheye.jar:?]
      	at com.atlassian.crucible.migration.BackupManagerImpl.createBackup(BackupManagerImpl.java:264) [fisheye.jar:?]
      	at com.atlassian.crucible.migration.BackupManagerImpl.access$000(BackupManagerImpl.java:55) [fisheye.jar:?]
      	at com.atlassian.crucible.migration.BackupManagerImpl$2$1.perform(BackupManagerImpl.java:153) [fisheye.jar:?]
      	at com.atlassian.crucible.migration.BackupManagerImpl$2$1.perform(BackupManagerImpl.java:151) [fisheye.jar:?]
      

      This does not affect users who upgraded directly to 4.0.2, and didn't ever run 4.0.0 or 4.0.1.

      Note, scheduled backups would not finish too, admins may not notice.

      Workaround

      Users can do the following to manually fix the functionality:

      1. Shutdown FishEye/Crucible
      2. Execute the following SQL script on the MS SQL Server database:
        DROP INDEX cru_idx_perm_fisheye_user ON cru_global_permission;
        ALTER TABLE cru_global_permission ALTER COLUMN cru_fisheye_user TINYINT NOT NULL;
        CREATE INDEX cru_idx_perm_fisheye_user ON cru_global_permission (cru_fisheye_user);
        
        DROP INDEX cru_idx_perm_crucible_user ON cru_global_permission;
        ALTER TABLE cru_global_permission ALTER COLUMN cru_crucible_user TINYINT NOT NULL;
        CREATE INDEX cru_idx_perm_crucible_user ON cru_global_permission (cru_crucible_user);
        
      3. Restart FishEye/Crucible

      Attachments

        Issue Links

          Activity

            People

              lpater Lukasz Pater
              lpater Lukasz Pater
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: