Could not determine the proper mapping from Oracle export, for column:DEFAULT

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

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

  1. Extract the XML Backup using any archive program and open the activeobject.xml file.
  2. Search for the "Column" called DEFAULT.
  3. 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>

    (warning) 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

  1. Extract the XML Backup if it is not extracted yet and open the activeobject.xml file.
  2. Search for the "Column" called DEFAULT and you should find the table declaration.
  3. 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>
  4. Search for the "Column" called DEFAULT again and there should be data mapping.
  5. 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>
  6. Save the file and compressed the file again.
  7. Import the edited XML Backup again to check for effect.
Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.