Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-71390

Importing XML backup in Jira 8 with Oracle 12 database fails with ORA-00955: Name is Already Used by an Existing Object

XMLWordPrintable

      Issue Summary

      This issue has been noted with ORA-00955 error in other places, but the other bugs mention Greenhopper (Software suite) specifically.  This failure is on an app table. 

      Steps to Reproduce

      1. Take an XML backup from a site with Zephyr installed. 
      2. Import the XML backup into a site with Oracle 12c database.  

      The driver does not seem to matter (version 12 vs. version 19).  

      Expected Results

      XML import completes without error. 

      IF it did encounter an error, then we also expect that dropping the table or sequence would fix it (it does not help). 

      Actual Results

      The below exception is thrown in the atlassian-jira.log file:

      2020-07-25 JiraImportTaskExecutionThread-1 ERROR /secure/admin/XmlRestore.jspa [c.a.j.bc.dataimport.DefaultDataImportService] Error during ActiveObjects restore
      com.atlassian.activeobjects.spi.ActiveObjectsImportExportException: 
      There was an error during import/export with plugin Zephyr for JIRA(com.thed.zephyr.je) #5.4.1.54108287 (table AO_7DEABF_CUSTOM_FIELD_PROJECT):Error executing update for SQL statement 'CREATE SEQUENCE "AO_7DEABF_CUSTOM_FI302672883" INCREMENT BY 1 START WITH 1 NOMAXVALUE MINVALUE 1'
      ...
      Caused by: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object
      

      Workaround

      Deleting the sequence, table, or database does not help as listed in previous bugs. 

      Instead, you must modify the XML backup, specifically the activeobjects.xml:

      The solution is to change the autoIncrement="true"to "false" in a single line of activeobjects.xml, for table name="AO_7DEABF_CUSTOM_FIELD"

      • Original line in your system:
        <column name="PROJECT_ID" primaryKey="false" autoIncrement="true" sqlType="2" precision="20"/>
        
      • Changed line (solution)
        <column name="PROJECT_ID" primaryKey="false" autoIncrement="false" sqlType="2" precision="20"/>

      Here are the steps needed for changing the file:

      1. Unzip the backup.zip file in a specific folder
      2. Edit the referred line into the table <table name="AO_7DEABF_CUSTOM_FIELD">
      3. Save the file
      4. Add the 2 files in a new zip file
      5. Copy this file to the recover location and proceed with the restore using Jira admin interface.

      It is important that only the 2 files must be zipped, if you put only them in a folder and zip the folder, this will not work.

              Unassigned Unassigned
              samann Sarah A
              Votes:
              10 Vote for this issue
              Watchers:
              17 Start watching this issue

                Created:
                Updated: