Error on importing from ASANA.

kevin lofton December 7, 2015

Error log:

2015-12-07 11:13:37,366 INFO - Import started by klofton using com.atlassian.jira.plugins.importer.asana.AsanaDataBean 2015-12-07 11:13:38,620 INFO - ------------------------------ 2015-12-07 11:13:38,620 INFO - Importing: Users 2015-12-07 11:13:38,621 INFO - ------------------------------ 2015-12-07 11:13:38,621 INFO - Only new items will be imported 2015-12-07 11:13:41,490 ERROR - Unexpected failure occurred. Importer will stop immediately. Data may be in an unstable state java.lang.NullPointerException: name argument cannot be null  at org.apache.commons.lang3.Validate.notNull(Validate.java:222)  at com.atlassian.crowd.directory.AbstractInternalDirectory.findUserByName(AbstractInternalDirectory.java:171)  at com.atlassian.crowd.directory.DbCachingRemoteDirectory.findUserByName(DbCachingRemoteDirectory.java:179)  at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.findUserByName(DirectoryManagerGeneric.java:289)  at com.atlassian.crowd.manager.application.ApplicationServiceGeneric.findUserByName(ApplicationServiceGeneric.java:344)  at com.atlassian.crowd.embedded.core.CrowdServiceImpl.getUser(CrowdServiceImpl.java:94)  at com.atlassian.crowd.embedded.core.DelegatingCrowdService.getUser(DelegatingCrowdService.java:43)  at com.atlassian.crowd.embedded.core.FilteredCrowdServiceImpl.getUser(FilteredCrowdServiceImpl.java:51)  at sun.reflect.GeneratedMethodAccessor1141.invoke(Unknown Source)  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  at java.lang.reflect.Method.invoke(Method.java:497)  at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)  at com.sun.proxy.$Proxy138.getUser(Unknown Source)  at sun.reflect.GeneratedMethodAccessor1141.invoke(Unknown Source)  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  at java.lang.reflect.Method.invoke(Method.java:497)  at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)  at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)  at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)  at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)  at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)  at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)  at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)  at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)  at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)  at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)  at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)  at com.sun.proxy.$Proxy1013.getUser(Unknown Source)  at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter$UserProvider.getUser(DefaultJiraDataImporter.java:1533)  at com.atlassian.jira.plugins.importer.external.ExternalUserUtils$1.apply(ExternalUserUtils.java:117)  at com.atlassian.jira.plugins.importer.external.ExternalUserUtils$1.apply(ExternalUserUtils.java:114)  at com.google.common.collect.Iterators$7.computeNext(Iterators.java:652)  at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)  at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)  at com.atlassian.jira.plugins.importer.external.ExternalUserUtils.checkInvalidUsernames(ExternalUserUtils.java:122)  at com.atlassian.jira.plugins.importer.external.ExternalUserUtils.prepareUsers(ExternalUserUtils.java:107)  at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importUsers(DefaultJiraDataImporter.java:552)  at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:333)  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  at java.lang.reflect.Method.invoke(Method.java:497)  at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)  at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)  at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)  at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)  at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)  at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)  at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)  at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)  at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)  at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)  at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)  at com.sun.proxy.$Proxy1389.doImport(Unknown Source)  at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:26)  at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:15)  at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:460)  at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:428)  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 com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:216)  at java.lang.Thread.run(Thread.java:745) 2015-12-07 11:13:41,493 INFO - No issues need to be reindexed.

 

3 answers

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 2, 2016
0 votes
Nick Martin March 14, 2016

No replies to this? I have the same problem. Tried to import an Asana project where all tasks have users assigned but get the same error.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2016

This particular error seems to indicate that it can't read the users from Asana properly - it's getting a "null" back from the user directory when it needs a name.  Do all your users exist?  None have ben deleted leaving assigned tasks behind?

Nick Martin March 14, 2016

I created a new test project in Asana with only 1 task and myself assigned to that task. I get the exact same error.

Does the importer look at all users? We have 6 active currently spread across many projects.

Here is a JSON export of that single task Asana project:

{
  "data": [
    {
      "id": 100442201544371,
      "created_at": "2016-03-14T14:06:06.084Z",
      "modified_at": "2016-03-14T14:06:13.397Z",
      "name": "Test Task",
      "notes": "",
      "completed": false,
      "assignee_status": "inbox",
      "completed_at": null,
      "due_on": null,
      "due_at": null,
      "workspace": {
        "id": 10981473815253,
        "name": "MagLoft"
      },
      "num_hearts": 0,
      "assignee": {
        "id": 831272212788,
        "name": "Nick Martin"
      },
      "parent": null,
      "subtasks": [],
      "hearts": [],
      "tags": [],
      "hearted": false,
      "followers": [
        {
          "id": 831272212788,
          "name": "Nick Martin"
        }
      ],
      "projects": [
        {
          "id": 100442201544370,
          "name": "Atest"
        }
      ],
      "memberships": [
        {
          "project": {
            "id": 100442201544370,
            "name": "Atest"
          },
          "section": null
        }
      ]
    }
  ]
}
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2016

Hmm.  Do those user IDs appear in your JIRA already?

Nick Martin March 14, 2016

Do you mean the assignee field? This JSON is only for a single project, with a single task (I made a dummy project) and I am assigned to that single task. I am the only user in JIRA as I'm testing it out. I am using my personal API key from Asana as there is no other option in JIRA. Does JIRA snoop out all our Asana users and then complain because the others aren't registered yet? How does it even match the users, by name? I Did make sure that my name is the same in Asana and Jira.

Thanks for your help here, appreciate it as there is only a 7 day trial.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2016

I can't answer the questions directly, as I don't know Asana that well, and I've not looked at the import code in any detail.

To try to answer some of it though - yes, the importer is trying to match your Asana users to JIRA users.  Whilst you can have issues without reporter or assignees, you can't just have a flat name or id in them if you do want to use them.  You have to have a valid user "object", which means the account needs to exist, with username, password, email and a display name.

I would expect the importer to try to import the users, matching on a unique login id.  But it looks like it is not doing it for some reason here.  Your Asana JSON seems to only have an id and a name, which is not enough for JIRA to create an account with, so I'm sort of guessing that is the problem (the minimum is login, email and display name - e.g. nic, nic@somewhere.com, Nic Brough)

Nick Martin March 14, 2016

Thanks Nic, appreciate the effort. I will try a ticket with JIRA as well.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 14, 2016

I'm sorry that my limited knowledge of Asana couldn't get us very far.  I know it's user-related because of the JIRA errors and your messages, and it really feels like the importer code is not dealing with Asana data properly (rather than the data being iffy), but I'm too far removed from it to be sure. 

A support call is definitely a good idea here!

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 7, 2015

Looks like it can't read the users from Asana

Suggest an answer

Log in or Sign up to answer