Uploaded image for project: 'FishEye'
  1. FishEye
  2. FE-6466

Backup of Oracle DB fails due to unknown type TIMESTAMP (93)

      DB backup

      When we try to backup FishEye with an Oracle DB, we fail on unsupported TIMESTAMP (93) type:

      2016-04-08 15:30:33,220 INFO  [ThreadPool2 ] fisheye MessageLoggingProgressMonitor-update - 245 rows written, 41 of 76 tables completed.
      2016-04-08 15:30:33,223 INFO  [ThreadPool2 ] fisheye HibernateUtil-makeWritable - DB going writable.
      2016-04-08 15:30:33,224 WARN  [ThreadPool2 ] fisheye MessageLoggingProgressMonitor-update - Error reading database: Cannot encode value for unsupported column type: "TIMESTAMP" (93) of column .CREATED_DATE
      2016-04-08 15:30:33,224 INFO  [ThreadPool2 ] fisheye MessageLoggingProgressMonitor-update - Backup failed
      2016-04-08 15:30:33,224 WARN  [ThreadPool2 ] fisheye BackupManagerImpl$2-run - Backup failed.
      java.io.IOException: Error reading database: Cannot encode value for unsupported column type: "TIMESTAMP" (93) of column .CREATED_DATE
              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:?]
              at com.atlassian.crucible.maintenance.MaintenanceManager.doMaintenance(MaintenanceManager.java:111) [fisheye.jar:?]
              at com.atlassian.crucible.migration.BackupManagerImpl$2.run(BackupManagerImpl.java:151) [fisheye.jar:?]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_60]
              at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_60]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_60]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_60]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_60]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_60]
              at java.lang.Thread.run(Thread.java:745) [?:1.8.0_60]
      Caused by: java.sql.SQLException: Cannot encode value for unsupported column type: "TIMESTAMP" (93) of column .CREATED_DATE
              at com.atlassian.crucible.migration.item.DBExporter.throwCantEncodeJdbcType(DBExporter.java:343) [fisheye.jar:?]
              at com.atlassian.crucible.migration.item.DBExporter.access$400(DBExporter.java:35) [fisheye.jar:?]
              at com.atlassian.crucible.migration.item.DBExporter$OracleColumnExporter.export(DBExporter.java:297) [fisheye.jar:?]
              at com.atlassian.crucible.migration.item.DBExporter.exportRow(DBExporter.java:355) [fisheye.jar:?]
              at com.atlassian.crucible.migration.item.DBExporter.exportTable(DBExporter.java:164) [fisheye.jar:?]
              at com.atlassian.crucible.migration.item.DBExporter.exportData(DBExporter.java:103) [fisheye.jar:?]
              at com.atlassian.crucible.migration.item.SQLBackup$SaverImpl.backup(SQLBackup.java:69) [fisheye.jar:?]
              ... 13 more

      DB migration

      Broken backup means also broken DB migration. When current DB type is Oracle and I try to move to Postgres, the migration fails:

      Started
      Starting ActiveObjects backup...
      * Backing up Database Information
      * Backing up Table Definitions
      ** Table count: 5
      * Backing up Tables
      ** Backing up 'AO_2913F5_COMMENT_ISSUE'
      ** Backing up 'AO_38321B_CUSTOM_CONTENT_LINK'
      ** Backing up 'AO_8219D4_COMMIT_HOOK_CONFIG'
      ** Backing up 'AO_A0B856_WEB_HOOK_LISTENER_AO'
      ** Backing up 'AO_B434B9_WEB_HOOK'
      ActiveObjects backup completed!
      Dropping existing tables...
      Cannot encode value for unsupported column type: "TIMESTAMP" (93) of column .CREATED_DATE
      Database migration failed: java.sql.SQLException: Cannot encode value for unsupported column type: "TIMESTAMP" (93) of column .CREATED_DATE
      Problem running drop script (you may have to manually drop the DB) /Users/kcichy/src/fecru_a/output/dist/sql/POSTGRESQL/schema/drop_95.sql
      Database migration failed: com.cenqua.crucible.hibernate.CruDBException: Problem running drop script (you may have to manually drop the DB) /Users/kcichy/src/fecru_a/output/dist/sql/POSTGRESQL/schema/drop_95.sql

      FishEye instance correctly carries on using the old DB.

            [FE-6466] Backup of Oracle DB fails due to unknown type TIMESTAMP (93)

            Ryan Weiss added a comment -

            Got it. We'll do the upgrade. Thanks!

            Ryan Weiss added a comment - Got it. We'll do the upgrade. Thanks!

            the fix required code changes, there is no workaround available for affected versions, try upgrading to 4.0.4 or newer version instead.

            Piotr Swiecicki added a comment - the fix required code changes, there is no workaround available for affected versions, try upgrading to 4.0.4 or newer version instead.

            Ryan Weiss added a comment -

            What was the fix on this? I'm seeing the same issue and was hoping I could get it resolved.

            Ryan Weiss added a comment - What was the fix on this? I'm seeing the same issue and was hoping I could get it resolved.

              kcichy Kamil Cichy (Inactive)
              kcichy Kamil Cichy (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 0.3h
                  0.3h