Uploaded image for project: 'Migration Platform'
  1. Migration Platform
  2. MIG-52

Space Import to Confluence Cloud fails if user email is invalid and cannot be invited

    XMLWordPrintable

    Details

    • Support reference count:
      1

      Description

      Issue Summary

      Import with Cloud Migration Assistant for Confluence fails if user cannot be invited

      Environment

      • Confluence Server with Cloud Migration Assistant for Source
      • Confluence Cloud for Destination

      Steps to Reproduce

      1. Create content on Confluence Server with a user that has an invalid e-mail for Cloud (Missing TLD for example)
      2. Use Cloud Migration Assistant for Confluence app to migrate
      3. Select option to migrate no users or groups

      Expected Results

      Migration assistant performs pre-transfer checks and warns about user with invalid e-mail

      Actual Results

      Migration assistant allows the migration plan to be ran which eventually fails.
      Error logs show:

          	 stack:	 com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: Failed to call to IDP to invite user
      com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:101)
      com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:390)
      com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:359)
      com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:165)
      com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:218)
      com.atlassian.confluence.importexport.Importer.doImport(Importer.java:68)
      ....
      java.lang.Thread.run(Thread.java:748)
      
      Caused by: org.xml.sax.SAXException: Error while importing backup: Failed to call to IDP to invite user
      com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:45)
      org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
      org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      com.atlassian.security.xml.RestrictedXMLReader.parse(RestrictedXMLReader.java:103)
      com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.parseBackup(DefaultXmlImporter.java:122)
      com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:88)
      ... 83 more
      
      Caused by: java.lang.RuntimeException: Failed to call to IDP to invite user
      com.atlassian.confluence.importexport.impl.DefaultEmailAaidMapper.invite(DefaultEmailAaidMapper.java:113)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:498)
      com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
      com.sun.proxy.$Proxy463.invite(Unknown Source)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:498)
      org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
      org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
      org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
      org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor$1.run(ServiceTCCLInterceptor.java:61)
      org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:130)
      org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokePrivileged(ServiceTCCLInterceptor.java:58)
      org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:50)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
      org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
      com.sun.proxy.$Proxy2216.invite(Unknown Source)
      com.atlassian.studio.confluence.importexport.UserEmailPreProcessor.lambda$setAidByEmail$3(UserEmailPreProcessor.java:181)
      java.util.Optional.ifPresent(Optional.java:159)
      com.atlassian.studio.confluence.importexport.UserEmailPreProcessor.setAidByEmail(UserEmailPreProcessor.java:177)
      com.atlassian.studio.confluence.importexport.UserEmailPreProcessor.process(UserEmailPreProcessor.java:101)
      com.atlassian.confluence.importexport.ChainedImportedObjectPreProcessor.process(ChainedImportedObjectPreProcessor.java:52)
      com.atlassian.confluence.importexport.ChainedImportedObjectPreProcessor.process(ChainedImportedObjectPreProcessor.java:52)
      com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.processObject(DefaultImportProcessor.java:31)
      com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:43)
      ... 95 more
      
      Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: InviteUserIdentityPlatformCommand failed and no fallback available.
      com.netflix.hystrix.AbstractCommand$22.call(AbstractCommand.java:822)
      com.netflix.hystrix.AbstractCommand$22.call(AbstractCommand.java:807)
      rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:140)
      rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
      rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
      com.netflix.hystrix.AbstractCommand$DeprecatedOnFallbackHookApplication$1.onError(AbstractCommand.java:1472)
      com.netflix.hystrix.AbstractCommand$FallbackHookApplication$1.onError(AbstractCommand.java:1397)
      rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
      rx.observers.Subscribers$5.onError(Subscribers.java:230)
      rx.internal.operators.OnSubscribeThrow.call(OnSubscribeThrow.java:44)
      rx.internal.operators.OnSubscribeThrow.call(OnSubscribeThrow.java:28)
      rx.Observable.unsafeSubscribe(Observable.java:10151)
      rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51)
      rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)
      rx.Observable.unsafeSubscribe(Observable.java:10151)
      rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
      rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
      rx.Observable.unsafeSubscribe(Observable.java:10151)
      rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
      rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
      rx.Observable.unsafeSubscribe(Observable.java:10151)
      rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
      rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
      rx.Observable.unsafeSubscribe(Observable.java:10151)
      rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
      rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
      rx.Observable.unsafeSubscribe(Observable.java:10151)
      rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:142)
      rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
      rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
      com.netflix.hystrix.AbstractCommand$HystrixObservableTimeoutOperator$3.onError(AbstractCommand.java:1194)
      rx.internal.operators.OperatorSubscribeOn$1$1.onError(OperatorSubscribeOn.java:59)
      rx.observers.Subscribers$5.onError(Subscribers.java:230)
      rx.internal.operators.OnSubscribeDoOnEach$DoOnEachSubscriber.onError(OnSubscribeDoOnEach.java:87)
      rx.observers.Subscribers$5.onError(Subscribers.java:230)
      com.netflix.hystrix.AbstractCommand$DeprecatedOnRunHookApplication$1.onError(AbstractCommand.java:1431)
      com.netflix.hystrix.AbstractCommand$ExecutionHookApplication$1.onError(AbstractCommand.java:1362)
      rx.observers.Subscribers$5.onError(Subscribers.java:230)
      rx.observers.Subscribers$5.onError(Subscribers.java:230)
      rx.internal.operators.OnSubscribeThrow.call(OnSubscribeThrow.java:44)
      rx.internal.operators.OnSubscribeThrow.call(OnSubscribeThrow.java:28)
      rx.Observable.unsafeSubscribe(Observable.java:10151)
      rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51)
      rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
      rx.Observable.unsafeSubscribe(Observable.java:10151)
      rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51)
      rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)
      rx.Observable.unsafeSubscribe(Observable.java:10151)
      rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
      rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
      rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
      rx.Observable.unsafeSubscribe(Observable.java:10151)
      rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)
      com.netflix.hystrix.strategy.concurrency.HystrixContexSchedulerAction$1.call(HystrixContexSchedulerAction.java:56)
      com.netflix.hystrix.strategy.concurrency.HystrixContexSchedulerAction$1.call(HystrixContexSchedulerAction.java:47)
      com.atlassian.workcontext.api.WorkContextFunctionWrapper.lambda$withContext$2(WorkContextFunctionWrapper.java:65)
      com.atlassian.workcontext.api.WorkContextFunctionWrapper.lambda$withContext$7(WorkContextFunctionWrapper.java:117)
      com.atlassian.workcontext.api.WorkContextFunctionWrapper.lambda$withContext$3(WorkContextFunctionWrapper.java:74)
      com.netflix.hystrix.strategy.concurrency.HystrixContexSchedulerAction.call(HystrixContexSchedulerAction.java:69)
      rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
      java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      java.util.concurrent.FutureTask.run(FutureTask.java:266)
      ... 3 more
      
      Caused by: com.atlassian.idp.client.exceptions.BadRequestException: {"errorType":"InvalidSchema","message":"Invalid email address"}
      com.atlassian.idp.client.IdentityPlatformClientImpl.mapStatusCodeException(IdentityPlatformClientImpl.java:706)
      com.atlassian.idp.client.IdentityPlatformClientImpl.mapInputStream(IdentityPlatformClientImpl.java:621)
      com.atlassian.idp.client.IdentityPlatformClientImpl.makeRequestWithJsonEntityBody(IdentityPlatformClientImpl.java:606)
      com.atlassian.idp.client.IdentityPlatformClientImpl.inviteUser(IdentityPlatformClientImpl.java:418)
      com.atlassian.confluence.internal.idp.InviteUserIdentityPlatformCommand.run(InviteUserIdentityPlatformCommand.java:32)
      com.atlassian.confluence.internal.idp.InviteUserIdentityPlatformCommand.run(InviteUserIdentityPlatformCommand.java:17)
      com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:302)
      com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:298)
      rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:46)
      ... 29 more	
      

      Workaround

      Edit e-mail address for users so they are valid before attempting another migration using the app.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dalmeida@atlassian.com David Almeida
              Reporter:
              hbui Houston B.
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: