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

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.

          Form Name

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

            Marek Parfianowicz made changes -
            Component/s New: Server administration [ 50891 ]
            Component/s Original: Backup & Restore [ 12831 ]
            Owen made changes -
            Workflow Original: FE-CRUC Bug Workflow [ 2940047 ] New: JAC Bug Workflow v3 [ 2955503 ]
            Owen made changes -
            Workflow Original: FECRU Development Workflow - Triage - Restricted [ 1515241 ] New: FE-CRUC Bug Workflow [ 2940047 ]
            Owen made changes -
            Workflow Original: FECRU Development Workflow - Triage [ 1388888 ] New: FECRU Development Workflow - Triage - Restricted [ 1515241 ]
            Cezary Zawadka made changes -
            Link New: This issue is related to CRUC-7722 [ CRUC-7722 ]
            Cezary Zawadka made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Needs Triage [ 10030 ] New: Closed [ 6 ]
            Cezary Zawadka made changes -
            Component/s New: Backup & Restore [ 12831 ]
            Component/s Original: Backup & Restore [ 12832 ]
            Fix Version/s New: 4.1.0 [ 61350 ]
            Fix Version/s New: 4.0.4 [ 61640 ]
            Fix Version/s Original: 4.0.4 [ 61633 ]
            Fix Version/s Original: 4.1.0 [ 61392 ]
            Key Original: FE-6520 New: CRUC-7721
            Affects Version/s New: 4.0.3 [ 61500 ]
            Affects Version/s New: 4.0.2 [ 61594 ]
            Affects Version/s New: 4.0.1 [ 61592 ]
            Affects Version/s New: 4.0.0 [ 41891 ]
            Affects Version/s Original: 4.0.0 [ 41892 ]
            Affects Version/s Original: 4.0.1 [ 61591 ]
            Affects Version/s Original: 4.0.2 [ 61595 ]
            Affects Version/s Original: 4.0.3 [ 61501 ]
            Project Original: FishEye [ 11830 ] New: Crucible [ 11771 ]
            Cezary Zawadka made changes -
            Remote Link New: This issue links to "FishEyeCrucible › master › 4.1-FE-6466-oracle-backup-timestamp (devtools-bamboo)" [ 174446 ]
            Cezary Zawadka made changes -
            Remote Link New: This issue links to "Page (Extranet)" [ 174445 ]
            Cezary Zawadka made changes -
            Link New: This issue was split into FECRU-6613 [ FECRU-6613 ]

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

                Created:
                Updated:
                Resolved: