java.lang.RuntimeException: java.lang.IllegalArgumentException: Unable to find an artifact definition for name: ArtifactTwo

Atlassian JIRA | Kah Loun Foong [Atlassian] | 5 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 When the build plan is changed in Deployment Project setting, Deployment Artifact Download task does not update with the latest shared artifact h3. Steps to Reproduce # Create build plan PLAN-ONE # Create two artifacts "ArtifactOne" and "ArtifactTwo" # Perform a build on PLAN-ONE # Create a Deployment project for PLAN-ONE # Set Artifact Download to download "ArtifactOne" to Destination Path "One" and "ArtifactTwo" to "Two" # Clone the plan to create PLAN-TWO and trigger a build # Edit Deployment project in Step 4 to use build plan PLAN-TWO # Create a release and deploy it h3. Expected Results Artifact Download task will download "ArtifactOne" to Destination Path "One" and "ArtifactTwo" to "Two" h3. Actual Results The below exception is thrown in the atlassian-bamboo.log: {noformat} 2016-09-14 23:37:41,891 ERROR [http-nio-8085-exec-25] [ChainPluginSupportHelper] Task context data provider failed:java.lang.IllegalArgumentException: Unable to find an artifact definition for name: ArtifactTwo 2016-09-14 23:37:41,892 INFO [http-nio-8085-exec-25] [DefaultErrorHandler] Recording an error: com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:artifactdownloadertask : 1245185-1409025 : Unable to find an artifact definition for name: ArtifactTwo 2016-09-14 23:37:41,893 WARN [http-nio-8085-exec-25] [DeploymentExecutionServiceImpl] java.lang.RuntimeException: java.lang.IllegalArgumentException: Unable to find an artifact definition for name: ArtifactTwo at com.atlassian.bamboo.chains.ChainPluginSupportHelper.prepareRuntimeTaskData(ChainPluginSupportHelper.java:64) at com.atlassian.bamboo.deployments.execution.service.DeploymentExecutionServiceImpl.lambda$null$16(DeploymentExecutionServiceImpl.java:219) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:206) at com.atlassian.bamboo.variable.CustomVariableContextRunnerImpl.execute(CustomVariableContextRunnerImpl.java:33) at com.atlassian.bamboo.deployments.execution.service.DeploymentExecutionServiceImpl.lambda$execute$17(DeploymentExecutionServiceImpl.java:218) ... Caused by: java.lang.IllegalArgumentException: Unable to find an artifact definition for name: ArtifactTwo at com.atlassian.bamboo.plugins.artifact.ArtifactDownloaderRuntimeDataProvider.populateRuntimeTaskData(ArtifactDownloaderRuntimeDataProvider.java:128) at com.atlassian.bamboo.chains.ChainPluginSupportHelper.prepareRuntimeTaskData(ChainPluginSupportHelper.java:40) {noformat} h3. Notes # The deployment will be hang and need to be stop manually # The Artifact Download does not show the original setting in Step 5. All artifacts option is selected. If the Deployment Project is edited to use back PLAN-ONE, the Artifact Download task will show the correct setting again # If "ArtifactTwo" is deleted in PLAN-TWO before Step 7 is performed, Bamboo will have a warning: {noformat} Shared artifact 'ArtifactTwo' not found in the new source plan. Artifact is used in environment 'staging' {noformat} h3.Workaround Need to reconfigure Deployment Artifact Download task in Step 5 again

    Atlassian JIRA | 5 months ago | Kah Loun Foong [Atlassian]
    java.lang.RuntimeException: java.lang.IllegalArgumentException: Unable to find an artifact definition for name: ArtifactTwo

    Root Cause Analysis

    1. java.lang.RuntimeException

      java.lang.IllegalArgumentException: Unable to find an artifact definition for name: ArtifactTwo

      at com.atlassian.bamboo.chains.ChainPluginSupportHelper.prepareRuntimeTaskData()
    2. com.atlassian.bamboo
      DeploymentExecutionServiceImpl.lambda$execute$17
      1. com.atlassian.bamboo.chains.ChainPluginSupportHelper.prepareRuntimeTaskData(ChainPluginSupportHelper.java:64)
      2. com.atlassian.bamboo.deployments.execution.service.DeploymentExecutionServiceImpl.lambda$null$16(DeploymentExecutionServiceImpl.java:219)
      3. com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:206)
      4. com.atlassian.bamboo.variable.CustomVariableContextRunnerImpl.execute(CustomVariableContextRunnerImpl.java:33)
      5. com.atlassian.bamboo.deployments.execution.service.DeploymentExecutionServiceImpl.lambda$execute$17(DeploymentExecutionServiceImpl.java:218)
      5 frames