Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-63367

Cloud to server import fails with 'could not find entity' errors in logs

    XMLWordPrintable

    Details

      Description

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      Summary

      Cloud to Server Import Fails due to unknown Entities

      Environment

      • Cloud backup created from JIRA Build 1000.571.2#100021-sha1:be9d69a21ddd1ef41d0d1a95feb6b77a6714b7e4
      • JIRA Server 7.2.1

      Steps to Reproduce

      1. Generate backup from cloud instance
      2. Restore to JIRA Server 7.2.1

      Expected Results

      The import will complete successfully.

      Actual Results

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

      2016-11-29 16:25:52,443 JiraImportTaskExecutionThread-1 ERROR anonymous 971x59x1 1ddmzvy 172.20.44.29 /secure/SetupImport.jspa [c.a.j.bc.dataimport.DefaultDataImportService] Error importing data: java.lang.IllegalArgumentException: [GenericDelegator.makeValue] could not find entity for entityName: UpgradeTaskHistory
      java.lang.IllegalArgumentException: [GenericDelegator.makeValue] could not find entity for entityName: UpgradeTaskHistory
              at org.ofbiz.core.entity.GenericDelegator.makeValue(GenericDelegator.java:491)
              at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.makeValue(DefaultOfBizDelegator.java:315)
              at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.makeValue(WrappingOfBizDelegator.java:182)
              at com.atlassian.jira.bc.dataimport.OfbizImportHandler.parseValue(OfbizImportHandler.java:287)
              at com.atlassian.jira.bc.dataimport.OfbizImportHandler.startElement(OfbizImportHandler.java:204)
              at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
              at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
              at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
              at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
              at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
              at com.atlassian.security.xml.RestrictedXMLReader.parse(RestrictedXMLReader.java:103)
              at com.atlassian.jira.bc.dataimport.DefaultDataImportService.restoreData(DefaultDataImportService.java:891)
              at com.atlassian.jira.bc.dataimport.DefaultDataImportService.performImport(DefaultDataImportService.java:719)
              at com.atlassian.jira.bc.dataimport.DefaultDataImportService.doImport(DefaultDataImportService.java:324)
              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(FutureTask.java:266)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      

      Prior to the failure the following error is also observed:

      2016-11-29 16:12:43,621 JiraImportTaskExecutionThread-1 INFO anonymous 971x59x1 1ddmzvy 172.20.44.29 /secure/SetupImport.jspa [c.a.j.bc.dataimport.OfbizImportHandler] Failed to parse value for element UpgradeTaskHistoryAuditLog.
      java.lang.IllegalArgumentException: [GenericDelegator.makeValue] could not find entity for entityName: UpgradeTaskHistoryAuditLog
      	at org.ofbiz.core.entity.GenericDelegator.makeValue(GenericDelegator.java:491)
      	at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.makeValue(DefaultOfBizDelegator.java:315)
      	at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.makeValue(WrappingOfBizDelegator.java:182)
      	at com.atlassian.jira.bc.dataimport.OfbizImportHandler.parseValue(OfbizImportHandler.java:287)
      	at com.atlassian.jira.bc.dataimport.OfbizImportHandler.parseValueFailsafe(OfbizImportHandler.java:271)
      	at com.atlassian.jira.bc.dataimport.OfbizImportHandler.startElement(OfbizImportHandler.java:207)
      	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
      	at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
      	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
      	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      	at com.atlassian.security.xml.RestrictedXMLReader.parse(RestrictedXMLReader.java:103)
      	at com.atlassian.jira.bc.dataimport.DefaultDataImportService.parseXmlAndValidateBackupData(DefaultDataImportService.java:367)
      	at com.atlassian.jira.bc.dataimport.DefaultDataImportService.doImport(DefaultDataImportService.java:290)
      	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(FutureTask.java:266)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      Workaround

      • Unzip the backup
      • Run the following command to remove these entries
        • egrep -v "(UpgradeTaskHistoryAuditLog|UpgradeTaskHistory)" entities.xml > entities-purged.xml
      • Run the command to rezip the backup:
        • mv entities-purged.xml entities.xml ; zip -r MyBackupFile.zip entities.xml activeobjects.xml
      • Restore should now complete successfully

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tevans Tim Evans
              Reporter:
              ddiblasio David Di Blasio
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: