java.lang.Exception: Unable to import Project ExternalProject{id='null', key='SAM', externalName='null', name='Sample data'}

Atlassian JIRA | Luciano Fagundes [Atlassian] | 11 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    h3. Summary JSON File Example provided on JIRA 7 documentation is not compatible with JIRA 7. h3. Steps to Reproduce Attempt to import a project using the JSON Source Example (_Project Key and Issue Key_) provided on [Importing data from JSON|https://confluence.atlassian.com/adminjiraserver071/importing-data-from-json-802592907.html#ImportingdatafromJSON-CreatingaJSONfileforImport] documentation {noformat} { "projects": [ { "name": "Sample data", "key": "SAM", "issues": [ { "key" : "SAM-123", "status" : "Open", "reporter" : "admin", "summary" : "Parent case", "externalId": "123" } ] } ] } {noformat} h3. Expected Results To have the project created and imported properly. h3. Actual Results The project is not imported since it's missing the project type, giving the error below: {noformat} 2016-06-10 15:08:07,044 INFO - ------------------------------ 2016-06-10 15:08:07,044 INFO - Importing: Users 2016-06-10 15:08:07,044 INFO - ------------------------------ 2016-06-10 15:08:07,044 INFO - Only new items will be imported 2016-06-10 15:08:07,044 INFO - 0 users associated with import. All of them imported as inactive, this can be changed after import in User Access step. 2016-06-10 15:08:07,044 INFO - ------------------------------ 2016-06-10 15:08:07,044 INFO - Finished Importing : Users 2016-06-10 15:08:07,044 INFO - ------------------------------ 2016-06-10 15:08:07,044 INFO - 0 users successfully created. 2016-06-10 15:08:07,044 INFO - Retrieving projects... 2016-06-10 15:08:07,045 ERROR - Unexpected failure occurred. Importer will stop immediately. Data may be in an unstable state java.lang.Exception: Unable to import Project ExternalProject{id='null', key='SAM', externalName='null', name='Sample data'} at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importProject(DefaultJiraDataImporter.java:648) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:357) 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:538) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:501) 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:254) at java.lang.Thread.run(Thread.java:745) Caused by: com.atlassian.jira.plugins.importer.external.ExternalException: Unable to create project: ExternalProject{id='null', key='SAM', externalName='null', name='Sample data'} at com.atlassian.jira.plugins.importer.managers.CreateProjectManagerImpl.createProject(CreateProjectManagerImpl.java:95) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importProject(DefaultJiraDataImporter.java:633) ... 10 more Caused by: com.atlassian.jira.exception.CreateException: An invalid project type was specified. Unfortunately you can't create a project without a project type. Please talk to your JIRA administrator for help. at com.atlassian.jira.plugins.importer.managers.CreateProjectManagerImpl.createProject(CreateProjectManagerImpl.java:82) ... 11 more 2016-06-10 15:08:07,045 INFO - No issues need to be reindexed. {noformat} h3.Solution / Workaround Include the project type as per JSON below: {noformat} { "projects": [ { "name": "Sample data", "key": "SAM", "type": "software", "issues": [ { "key" : "SAM-123", "status" : "Open", "reporter" : "admin", "summary" : "Parent case", "externalId": "123" } ] } ] } {noformat}

    Atlassian JIRA | 11 months ago | Luciano Fagundes [Atlassian]
    java.lang.Exception: Unable to import Project ExternalProject{id='null', key='SAM', externalName='null', name='Sample data'}
  2. 0

    Importing Data from JSON (beta release) - Atlassian Documentation

    atlassian.com | 1 year ago
    java.lang.Exception: Unable to import Project ExternalProject[jiraId=<null>,id=<null>,externalName=<null>,name=Sample Import,key=SAMPLE_IMPORT,url=<null>,lead=jmoszko,description=The Sample Import project,projectCategoryName=<null>,avatarUrl=<null>,assigneeType=3,versions=<null>,components=[com.atlassian.jira.plugins.importer.external.beans.ExternalComponent@5bd2d7[id=<null>,name=comp1,lead=<null>,description=<null>], com.atlassian.jira.plugins.importer.external.beans.ExternalComponent@6f3e29[id=<null>,name=Component 2,lead=<null>,description=<null>], com.atlassian.jira.plugins.importer.external.beans.ExternalComponent@15a003a[id=<null>,name=Component 1/2,lead=<null>,description=<null>]],issues=<null>,workflowSchemeName=<null>]
  3. 0

    {noformat} 2011-05-03 19:15:26,975 ERROR - Unable to import Project ExternalProject[jiraId=<null>,id=<null>,externalName=<null>,name=Testing Subtasks,key=SUB,url=<null>,lead=admin,description=<null>,projectCategoryName=<null>,assigneeType=2,workflowSchemeName=<null>] java.lang.Exception: Failed to add users to Developers role for the project: Errors: {} Error Messages: [] at com.atlassian.jira.plugins.importer.external.ExternalUserUtils.addUsersToProjectRole(ExternalUserUtils.java:99) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importProject(DefaultJiraDataImporter.java:456) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:216) at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:25) at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:14) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:359) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForTenant(DefaultMultiTenantManager.java:61) at com.atlassian.multitenant.juc.MultiTenantExecutors$WrappedRunnable.run(MultiTenantExecutors.java:160) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:249) at java.lang.Thread.run(Thread.java:662) 2011-05-03 19:15:26,976 ERROR - Unable to proceed. Could not retrieve a valid project {noformat}

    Ecosystem JIRA | 6 years ago | Wojtek Seliga
    java.lang.Exception: Failed to add users to Developers role for the project: Errors: {} Error Messages: []
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.atlassian.jira.exception.CreateException

      An invalid project type was specified. Unfortunately you can't create a project without a project type. Please talk to your JIRA administrator for help.

      at com.atlassian.jira.plugins.importer.managers.CreateProjectManagerImpl.createProject()
    2. com.atlassian.jira
      TaskManagerImpl$TaskCallableDecorator.call
      1. com.atlassian.jira.plugins.importer.managers.CreateProjectManagerImpl.createProject(CreateProjectManagerImpl.java:82)
      2. com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importProject(DefaultJiraDataImporter.java:633)
      3. com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:357)
      4. com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:26)
      5. com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:15)
      6. com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:538)
      7. com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:501)
      7 frames
    3. Java RT
      FutureTask.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      2. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      3. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      3 frames
    4. com.atlassian.jira
      ForkedThreadExecutor$ForkedRunnableDecorator.run
      1. com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:254)
      1 frame
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame