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

      Symptoms

      1. A Site Import from Confluence Server or Cloud to Confluence Cloud fails with the error:
        There was an error during import. You may either try again or raise a support request.
      2. The following error is logged in the logs:
        2014-12-18 18:12:03.912196500 java.lang.NullPointerException
        2014-12-18 18:12:03.912196500   at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.getIdBasedAttachmentPathMapping(FileBackupImporter.ja                            va:225)
        2014-12-18 18:12:03.912200500   at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importAttachments(FileBackupImporter.java:298)
        2014-12-18 18:12:03.912201500   at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:157)
        2014-12-18 18:12:03.912201500   at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(BackupImporter.java:259)
        2014-12-18 18:12:03.912203500   at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResul                            t.java:33)
        2014-12-18 18:12:03.912203500   at com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(Rest                            orePluginStateStoreTransactionCallbackDecorator.java:50)
        2014-12-18 18:12:03.912206500   at com.atlassian.confluence.importexport.xmlimport.RestoreBandanaValuesTransactionCallbackDecorator.doInTransaction(Restore                            BandanaValuesTransactionCallbackDecorator.java:50)
        2014-12-18 18:12:03.912207500   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
        2014-12-18 18:12:03.912208500   at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:211)
        2014-12-18 18:12:03.912209500   at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:77)
        2014-12-18 18:12:03.912209500   at com.atlassian.confluence.importexport.DefaultImportExportManager.performImportInternal(DefaultImportExportManager.java:8                            3)
        2014-12-18 18:12:03.912216500   at com.atlassian.confluence.importexport.DefaultImportExportManager.performImport(DefaultImportExportManager.java:73)
        2014-12-18 18:12:03.912217500   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        2014-12-18 18:12:03.912217500   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        2014-12-18 18:12:03.912223500   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        2014-12-18 18:12:03.912223500   at java.lang.reflect.Method.invoke(Method.java:597)
        2014-12-18 18:12:03.912224500   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
        2014-12-18 18:12:03.912224500   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        2014-12-18 18:12:03.912225500   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        2014-12-18 18:12:03.912226500   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
        2014-12-18 18:12:03.912227500   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        2014-12-18 18:12:03.912228500   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        2014-12-18 18:12:03.912228500   at $Proxy160.performImport(Unknown Source)
        2014-12-18 18:12:03.912229500   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        2014-12-18 18:12:03.912229500   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        2014-12-18 18:12:03.912230500   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        2014-12-18 18:12:03.912232500   at java.lang.reflect.Method.invoke(Method.java:597)
        2014-12-18 18:12:03.912233500   at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invok                            e(DefaultComponentRegistrar.java:134)
        2014-12-18 18:12:03.912233500   at $Proxy447.performImport(Unknown Source)
        2014-12-18 18:12:03.912234500   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        2014-12-18 18:12:03.912235500   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        2014-12-18 18:12:03.912235500   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        2014-12-18 18:12:03.912236500   at java.lang.reflect.Method.invoke(Method.java:597)
        2014-12-18 18:12:03.912236500   at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentF                            actoryBean.java:154)
        2014-12-18 18:12:03.912237500   at $Proxy447.performImport(Unknown Source)
        2014-12-18 18:12:03.912238500   at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:95)
        2014-12-18 18:12:03.912238500   at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:2                            7)
        2014-12-18 18:12:03.912240500   at com.atlassian.ondemand.confluenceimporter.service.importer.OnDemandImportLongRunningTask.runInternal(OnDemandImportLongR                            unningTask.java:182)
        2014-12-18 18:12:03.912243500   at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:2                            7)
        2014-12-18 18:12:03.912244500   at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:58)
        2014-12-18 18:12:03.912244500   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        2014-12-18 18:12:03.912245500   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        2014-12-18 18:12:03.912246500   at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        2014-12-18 18:12:03.912246500   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        2014-12-18 18:12:03.912247500   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        2014-12-18 18:12:03.912247500   at java.lang.Thread.run(Thread.java:662)
        2014-12-18 18:12:03.945779500 2014-12-18 18:12:03,941 INFO [Long running task: Importing data] [confluenceimporter.service.importer.OnDemandImportLongRunni                            ngTask] runInternal Import has finished running. isSuccessful=false, status=Import failed. Check your server logs for more information. null, elapsedTime=8                            992
        

      This error does not occur when you restore the backup to a Confluence Server.

      More errors may be logged as well:

      2015-01-21 14:38:07.298636500 2015-01-21 14:38:07,289 WARN [scheduler_Worker-1] [persistence.hibernate.batch.AbstractBatchProcessor] processBatch batch failed falling back to individual processing
      2015-01-21 14:38:07.298639500 java.lang.NullPointerException
      2015-01-21 14:38:07.298639500 	at com.atlassian.crowd.embedded.hibernate2.batch.operation.RemoveUserOperation.performOperation(RemoveUserOperation.java:38)
      2015-01-21 14:38:07.298640500 	at com.atlassian.crowd.embedded.hibernate2.batch.operation.RemoveUserOperation.performOperation(RemoveUserOperation.java:17)
      

      NB: If you are receiving this error, this is unrelated to this particular failure. Please see CONF-34180.

      _"Import failed. Check your server logs for more information. 
      com.atlassian.crowd.exception.runtime.GroupNotFoundException: Group <_licensed-confluence> does not exist"_
      

      Cause:
      Recent changes to the definition of Attachments as ContentEntityObjects.

      Workaround

      1. Search for an <object> Attachment containing the following regex: <property.*class="GlobalDescription" (i.e. a <property> tag with class GlobalDescription). Its title should be either global.logo or favicon-XX (there are different favicons). If it's not one of them, please comment on the ticket before removing.
      2. Remove the <object> tag (including its children)

      NB: Importing into OD-39 or 42 Server releases is successful and may be helpful in working around this problem if attempting to restore a backup from a Cloud instance that has been decommissioned.

        1. not-awesome-import-error.png
          41 kB
          Ryan Kiel
        2. siteimporterror.jpeg
          85 kB
          Mauro Badii

            [CONFSERVER-36040] Site Import Fail with java.lang.NullPointerException

            rsu
            There is an issue for this at CONF-34180

            Jonas Soderstrom (Inactive) added a comment - rsu There is an issue for this at CONF-34180

            Ryan Kiel added a comment -

            Awesome.. Just spent 2 days of vacation time trying to migrate Confluence Server -> Confluence Cloud... After finally finding this ticket I was able to import spaces but ONLY if I remove attachments.. 2 days wasted because of an database change barely documented with no workaround and no detailed error reporting (in cloud)..

            I did as much debugging as I could client side and there was no indication of what was happening..

            Screenshot of the issue below...

            Please fix this so we can do an actual migration from server to cloud? Without spending another 2 days manually adding attachments our wiki is useless

            Ryan Kiel added a comment - Awesome.. Just spent 2 days of vacation time trying to migrate Confluence Server -> Confluence Cloud... After finally finding this ticket I was able to import spaces but ONLY if I remove attachments.. 2 days wasted because of an database change barely documented with no workaround and no detailed error reporting (in cloud).. I did as much debugging as I could client side and there was no indication of what was happening.. Screenshot of the issue below... Please fix this so we can do an actual migration from server to cloud? Without spending another 2 days manually adding attachments our wiki is useless

            Hi mcoxe,

            The group name is probably being hidden by the web browser. Can you open a support case, so they can take a look at your logs to see what the culprit is? However, I'm sure it will be a similar one (_licensed-XXXX) or even the same.

            Angel Eduardo Garcia Hernandez (Inactive) added a comment - Hi mcoxe , The group name is probably being hidden by the web browser. Can you open a support case, so they can take a look at your logs to see what the culprit is? However, I'm sure it will be a similar one (_licensed-XXXX) or even the same.

            The comments @ 34180 state "As a workaround you can create a dummy-group before the import on the target Cloud instance, extract the backup's zip and open the 'entities.xml' file. Do a search for 'group-name' (the name of the group that's not being found) and replace all occurrences with the dummy-group name you previously created and save the file. Zip all the files again (maintaining the original structure) and re-try the import."

            In our case there is no "Group-Name" listed by the error message, as others have stated also. This is the sum total of the message:

            Import failed. Check your server logs for more information. com.atlassian.crowd.exception.runtime.GroupNotFoundException: Group does not exist

            As you can see - no group name listed. So what do we do now? The export was of a pre-existing small Confluence Cloud site (5 spaces, 17.8 MB entities.xml, .zip 280 MB including attachments). Imported via WebDAV directory to a Dev (Eval) instance created yesterday.

            Michael Coxe added a comment - The comments @ 34180 state "As a workaround you can create a dummy-group before the import on the target Cloud instance, extract the backup's zip and open the 'entities.xml' file. Do a search for 'group-name' (the name of the group that's not being found) and replace all occurrences with the dummy-group name you previously created and save the file. Zip all the files again (maintaining the original structure) and re-try the import." In our case there is no "Group-Name" listed by the error message, as others have stated also. This is the sum total of the message: Import failed. Check your server logs for more information. com.atlassian.crowd.exception.runtime.GroupNotFoundException: Group does not exist As you can see - no group name listed. So what do we do now? The export was of a pre-existing small Confluence Cloud site (5 spaces, 17.8 MB entities.xml, .zip 280 MB including attachments). Imported via WebDAV directory to a Dev (Eval) instance created yesterday.

              egarcia Angel Eduardo Garcia Hernandez (Inactive)
              stan@atlassian.com Seam Mee Tan (Inactive)
              Affected customers:
              5 This affects my team
              Watchers:
              21 Start watching this issue

                Created:
                Updated:
                Resolved: