Uploaded image for project: 'Xporter for Jira'
  1. Xporter for Jira
  2. XPORTER-834

JIRA generates error while restoring from backup due to BINARY type

    XporterXMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Release 4.2.1
    • Fix Version/s: Release 5.1.1
    • Component/s: App Settings, Database
    • Labels:
      None
    • Sprint:
      R5.2.0 Sprint 1
    • Requirement Status:

      Release 5.1.1 - OK

      Description

      Hello,
      I try to restore data from JIRA XML backup to TEST environment and get an error:

      I found in backup data –•proter for JIRA related structures which can't be processed during loading.
      In activeobjects.xml there's a table AO_3C6513_XPORTER_SECURITY and it's data.
      Table:

        <table name="AO_3C6513_XPORTER_SECURITY">
          <column name="ALGORITHM_KEY" primaryKey="false" autoIncrement="false" sqlType="12" precision="255"/>
          <column name="CHARSET_VALUE" primaryKey="false" autoIncrement="false" sqlType="12" precision="255"/>
          <column name="CIPHERTRANS_VALUE" primaryKey="false" autoIncrement="false" sqlType="12" precision="255"/>
          <column name="ID" primaryKey="true" autoIncrement="true" sqlType="4" precision="10"/>
          <column name="KEYSIZE_VALUE" primaryKey="false" autoIncrement="false" sqlType="4" precision="10"/>
          <column name="PASSWORD_VALUE" primaryKey="false" autoIncrement="false" sqlType="12" precision="255"/>
          <column name="PRIVATE_KEY_VALUE" primaryKey="false" autoIncrement="false" sqlType="2005" precision="1073741823"/>
          <column name="PRIVATE_VALUE" primaryKey="false" autoIncrement="false" sqlType="2004" precision="2147483647"/>
          <column name="PUBLIC_KEY_VALUE" primaryKey="false" autoIncrement="false" sqlType="2005" precision="1073741823"/>
          <column name="PUBLIC_VALUE" primaryKey="false" autoIncrement="false" sqlType="2004" precision="2147483647"/>
          <column name="USERNAME_VALUE" primaryKey="false" autoIncrement="false" sqlType="12" precision="255"/>
        </table>
      

      Data:

        <data tableName="AO_3C6513_XPORTER_SECURITY">
          <column name="ALGORITHM_KEY"/>
          <column name="CHARSET_VALUE"/>
          <column name="CIPHERTRANS_VALUE"/>
          <column name="ID"/>
          <column name="KEYSIZE_VALUE"/>
          <column name="PASSWORD_VALUE"/>
          <column name="PRIVATE_VALUE"/>
          <column name="PUBLIC_VALUE"/>
          <column name="USERNAME_VALUE"/>
          <column name="PRIVATE_KEY_VALUE"/>
          <column name="PUBLIC_KEY_VALUE"/>
          <row>
            <string>RSA</string>
            <string>UTF8</string>
            <string>RSA/ECB/PKCS1Padding</string>
            <integer>1</integer>
            <integer>512</integer>
            <string xsi:nil="true"/>
            <binary xsi:nil="true"/>
            <binary xsi:nil="true"/>
            <string xsi:nil="true"/>
            <string>[48,-126,1,83,2,1,0,48,13,6,9,42,-122,72,-122,-9,13,1,1,1,5,0,4,-126,1,61,48,-126,1,57,2,1,0,2,65,0,-63,86,-49,80,-92,22,107,-58,62,20,-89,-13,-63,124,-89,57,77,-18,-110,-71,-1,-125,48,86,-120,-105,-16,21,104,-77,112,-25,57,126,-128,-32,-26,-44,-57,-77,-52,24,27,41,-14,99,0,86,105,-39,31,-105,44,-75,15,80,10,109,65,-74,2,78,-100,-109,2,3,1,0,1,2,64,102,4,-2,-60,88,-79,-108,17,57,-75,0,-94,-7,88,99,-115,51,120,78,104,99,81,-64,114,9,5,-45,-92,24,105,-121,-117,48,-41,53,119,-61,32,-83,110,-112,-83,-13,63,-9,22,9,-7,-4,-64,-54,33,57,6,-123,-102,-63,20,2,-48,-31,96,-53,113,2,33,0,-31,10,-101,70,80,-92,-102,40,-56,-71,68,125,124,-78,55,71,-30,-78,-74,-128,52,-21,-45,55,111,25,80,-96,-30,126,-56,-19,2,33,0,-37,-17,-70,21,104,100,81,127,1,82,-47,46,118,-97,-113,16,87,-11,-94,-112,108,59,123,-72,97,-89,-67,-77,-126,-55,-53,127,2,32,93,-43,12,85,79,62,-78,-64,-102,-95,21,59,-75,-120,-95,-96,41,-104,22,-100,114,116,122,7,61,29,-77,14,-62,33,-41,41,2,32,80,24,118,-63,51,26,77,-97,-98,32,-59,-13,80,-39,-4,-28,-21,-45,-107,-41,88,-61,52,-28,74,20,39,126,-57,99,-84,11,2,32,35,33,24,38,90,-99,37,4,-97,-27,104,87,-106,-63,-88,-35,-120,48,64,-89,-124,108,42,-121,-83,-65,31,-80,122,-126,-125,118]</string>
            <string>[48,92,48,13,6,9,42,-122,72,-122,-9,13,1,1,1,5,0,3,75,0,48,72,2,65,0,-63,86,-49,80,-92,22,107,-58,62,20,-89,-13,-63,124,-89,57,77,-18,-110,-71,-1,-125,48,86,-120,-105,-16,21,104,-77,112,-25,57,126,-128,-32,-26,-44,-57,-77,-52,24,27,41,-14,99,0,86,105,-39,31,-105,44,-75,15,80,10,109,65,-74,2,78,-100,-109,2,3,1,0,1]</string>
          </row>
        </data>
      

      2 rows <binary xsi:nil="true"/> are the problem.
      I tried to replace them <string xsi:nil="true"/> but import failed with another error pointing to AO_3C6513_XPORTER_SECURITY table.

      Cutting the whole data block fixed the problem with import.
      I found XPORTER-681 which is similar but it was related to version upgrade/backup and fixed in v.4.0.4
      My issue still here. Please support.

      JIRA log cut. Initial problem with binary fields:

      2016-08-24 13:58:46,485 JiraImportTaskExecutionThread-1 DEBUG admin 836x1341x1 15ma8dg 10.142.220.32 /secure/admin/XmlRestore.jspa [c.a.activeobjects.osgi.ActiveObjectsServiceFactory] stopCleaning
      2016-08-24 13:58:48,157 JiraImportTaskExecutionThread-1 ERROR admin 836x1341x1 15ma8dg 10.142.220.32 /secure/admin/XmlRestore.jspa [c.a.j.bc.dataimport.DefaultDataImportService] Error importing data: java.lang.IllegalArgumentException: Unsupported field encountered: binary
      java.lang.IllegalArgumentException: Unsupported field encountered: binary
      	at com.atlassian.dbexporter.importer.DataImporter$BaseInserter.setValue(DataImporter.java:372)
      	at com.atlassian.dbexporter.importer.DataImporter.importTable(DataImporter.java:112)
      	at com.atlassian.dbexporter.importer.DataImporter.access$000(DataImporter.java:41)
      	at com.atlassian.dbexporter.importer.DataImporter$1.call(DataImporter.java:71)
      	at com.atlassian.dbexporter.importer.DataImporter$1.call(DataImporter.java:64)
      	at com.atlassian.dbexporter.jdbc.JdbcUtils.withConnection(JdbcUtils.java:28)
      	at com.atlassian.dbexporter.importer.DataImporter.doImportNode(DataImporter.java:64)
      	at com.atlassian.dbexporter.importer.AbstractImporter.importNode(AbstractImporter.java:44)
      	at com.atlassian.dbexporter.DbImporter.importData(DbImporter.java:69)
      	at com.atlassian.activeobjects.backup.ActiveObjectsBackup.restore(ActiveObjectsBackup.java:151)
      	at com.atlassian.jira.bc.dataimport.DefaultDataImportService.restoreActiveObjects(DefaultDataImportService.java:555)
      	at com.atlassian.jira.bc.dataimport.DefaultDataImportService.performImport(DefaultDataImportService.java:710)
      	at com.atlassian.jira.bc.dataimport.DefaultDataImportService.doImport(DefaultDataImportService.java:320)
      	at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:60)
      	at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:28)
      	at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:157)
      	at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:133)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      2016-08-24 13:58:48,282 JiraImportTaskExecutionThread-1 INFO admin 836x1341x1 15ma8dg 10.142.220.32 /secure/admin/XmlRestore.jspa [atlassian.servicedesk.lifecycle] 
      

      Error when I replaced binary's with string's:

      2016-08-25 13:36:54,864 JiraImportTaskExecutionThread-1 ERROR admin 814x999x1 uj72iq 10.142.220.32 /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 Xporter for JIRA(com.xpandit.plugins.jiraxporter) #4.2.1 (table AO_3C6513_XPORTER_SECURITY):
      	at com.atlassian.activeobjects.backup.ImportExportErrorServiceImpl.newImportExportSqlException(ImportExportErrorServiceImpl.java:26)
      	at com.atlassian.dbexporter.importer.DataImporter$BatchInserter.flush(DataImporter.java:429)
      	at com.atlassian.dbexporter.importer.DataImporter$BatchInserter.close(DataImporter.java:434)
      	at com.atlassian.dbexporter.importer.DataImporter.importTable(DataImporter.java:120)
      	at com.atlassian.dbexporter.importer.DataImporter.access$000(DataImporter.java:41)
      	at com.atlassian.dbexporter.importer.DataImporter$1.call(DataImporter.java:71)
      	at com.atlassian.dbexporter.importer.DataImporter$1.call(DataImporter.java:64)
      	at com.atlassian.dbexporter.jdbc.JdbcUtils.withConnection(JdbcUtils.java:28)
      	at com.atlassian.dbexporter.importer.DataImporter.doImportNode(DataImporter.java:64)
      	at com.atlassian.dbexporter.importer.AbstractImporter.importNode(AbstractImporter.java:44)
      	at com.atlassian.dbexporter.DbImporter.importData(DbImporter.java:69)
      	at com.atlassian.activeobjects.backup.ActiveObjectsBackup.restore(ActiveObjectsBackup.java:151)
      	at com.atlassian.jira.bc.dataimport.DefaultDataImportService.restoreActiveObjects(DefaultDataImportService.java:555)
      	at com.atlassian.jira.bc.dataimport.DefaultDataImportService.performImport(DefaultDataImportService.java:710)
      	at com.atlassian.jira.bc.dataimport.DefaultDataImportService.doImport(DefaultDataImportService.java:320)
      	at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:60)
      	at com.atlassian.jira.web.action.setup.DataImportAsyncCommand.call(DataImportAsyncCommand.java:28)
      	at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:157)
      	at com.atlassian.jira.task.ImportTaskManagerImpl$TaskCallableDecorator.call(ImportTaskManagerImpl.java:133)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.sql.BatchUpdateException: Operand type clash: nvarchar is incompatible with image
      	at net.sourceforge.jtds.jdbc.JtdsStatement.executeBatch(JtdsStatement.java:1069)
      	at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:345)
      	at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:345)
      	at com.atlassian.dbexporter.importer.DataImporter$BatchInserter.flush(DataImporter.java:422)
      	... 23 more
      2016-08-25 13:36:54,880 JiraImportTaskExecutionThread-1 WARN admin 814x999x1 uj72iq 10.142.220.32 /secure/admin/XmlRestore.jspa [c.a.j.p.d.dao.impl.CachingOrganizationDaoImpl] onImportCompleted - clearing cache !!
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sdrg Severino Goios
                Reporter:
                ilya.kutaev@civ-life.com Ilya Kutaev
              • Votes:
                5 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 2 hours
                  1d 2h