Could not determine the proper mapping from Oracle export, for column:DEFAULT
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
When trying to restore JIRA XML Backup on another instance, the stack trace below shown on the UI and atlassian-jira.log:
2015-08-17 22:37:19,306 JiraImportTaskExecutionThread-1 ERROR admin 1351x886x1 pb6o 127.0.0.1 /secure/admin/XmlRestore.jspa [jira.bc.dataimport.DefaultDataImportService] Error importing data: java.lang.IllegalStateException: Could not determine the proper mapping from Oracle export, for column:DEFAULT
java.lang.IllegalStateException: Could not determine the proper mapping from Oracle export, for column:DEFAULT
at com.atlassian.activeobjects.backup.ActiveObjectsTableCreator.getSqlType(ActiveObjectsTableCreator.java:158)
at com.atlassian.activeobjects.backup.ActiveObjectsTableCreator.isString(ActiveObjectsTableCreator.java:176)
at com.atlassian.activeobjects.backup.ActiveObjectsTableCreator.getQualifiers(ActiveObjectsTableCreator.java:167)
Diagnosis
Diagnostic Steps
- Extract the XML Backup using any archive program and open the
activeobject.xml
file. - Search for the "Column" called DEFAULT.
The following information should be found.
<table name="AO_AEFED0_TEAM_ROLE"> <column name="DEFAULT" primaryKey="false" autoIncrement="false" sqlType="2"/> <column name="I18N_KEY" primaryKey="false" autoIncrement="false" sqlType="12" precision="255"/> <column name="ID" primaryKey="true" autoIncrement="true" sqlType="2" precision="11"/> <column name="NAME" primaryKey="false" autoIncrement="false" sqlType="12" precision="255"/> </table> ... <data tableName="AO_AEFED0_TEAM_ROLE"> <column name="I18N_KEY"/> <column name="ID"/> <column name="NAME"/> <column name="DEFAULT"/> <row> <string>tempo-teams.role.member</string> <integer>1</integer> <string>Member</string> <integer>1</integer> </row>
The Mapping may vary to the version of the plugin. To create a new instance with the same version for JIRA and the plugin is advisable.
Cause
The mapping and declaration of the Column is incorrect making the Import is not possible. The correct Column mapping and declaration for the Active Object above is:
<table name="AO_AEFED0_TEAM_ROLE">
<column name="DEFAULT" primaryKey="false" autoIncrement="false" sqlType="2" precision="1"/>
<column name="I18N_KEY" primaryKey="false" autoIncrement="false" sqlType="12" precision="255"/>
<column name="ID" primaryKey="true" autoIncrement="true" sqlType="2" precision="11"/>
<column name="NAME" primaryKey="false" autoIncrement="false" sqlType="12" precision="255"/>
</table>
...
<data tableName="AO_AEFED0_TEAM_ROLE">
<column name="DEFAULT"/>
<column name="I18N_KEY"/>
<column name="ID"/>
<column name="NAME"/>
<row>
<boolean>true</boolean>
<string>tempo-teams.role.member</string>
<integer>1</integer>
<string>Member</string>
</row>
Resolution
- Extract the XML Backup if it is not extracted yet and open the
activeobject.xml
file. - Search for the "Column" called DEFAULT and you should find the
table
declaration. Replace it with:
<table name="AO_AEFED0_TEAM_ROLE"> <column name="DEFAULT" primaryKey="false" autoIncrement="false" sqlType="2" precision="1"/> <column name="I18N_KEY" primaryKey="false" autoIncrement="false" sqlType="12" precision="255"/> <column name="ID" primaryKey="true" autoIncrement="true" sqlType="2" precision="11"/> <column name="NAME" primaryKey="false" autoIncrement="false" sqlType="12" precision="255"/> </table>
- Search for the "Column" called DEFAULT again and there should be
data
mapping. Replace it with:
<data tableName="AO_AEFED0_TEAM_ROLE"> <column name="DEFAULT"/> <column name="I18N_KEY"/> <column name="ID"/> <column name="NAME"/> <row> <boolean>true</boolean> <string>tempo-teams.role.member</string> <integer>1</integer> <string>Member</string> </row> <row> <boolean>false</boolean> <string>tempo-teams.role.product.owner</string> <integer>2</integer> <string>Product Owner</string> </row> <row> <boolean>false</boolean> <string>tempo-teams.role.scrum.master</string> <integer>3</integer> <string>Scrum Master</string> </row> <row> <boolean>false</boolean> <string>tempo-teams.role.developer</string> <integer>4</integer> <string>Developer</string> </row> <row> <boolean>false</boolean> <string>tempo-teams.role.designer</string> <integer>5</integer> <string>Designer</string> </row> <row> <boolean>false</boolean> <string>tempo-teams.role.tester</string> <integer>6</integer> <string>Tester</string> </row> <row> <boolean>false</boolean> <string>tempo-teams.role.technical.writer</string> <integer>7</integer> <string>Technical Writer</string> </row> <row> <boolean>false</boolean> <string>tempo-teams.role.business.analyst</string> <integer>8</integer> <string>Business Analyst</string> </row> </data>
- Save the file and compressed the file again.
- Import the edited XML Backup again to check for effect.