It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I am facing java.lang.NullPointerException exception while coping artifact through SCP task

Starting task 'Copy Artifact to NP2 QAPROD' of type 'com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask'
simple	19-Mar-2018 03:33:10	Connecting to dkdl6351.dcsgomni.com on port: 22
error	19-Mar-2018 03:33:10	Error occurred while running Task 'Copy Artifact to NP2 QAPROD(3)' of type com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask.
error	19-Mar-2018 03:33:10	java.lang.NullPointerException
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.plugins.scp.SSHKeyProvider.<init>(SSHKeyProvider.java:26)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.plugins.scp.ScpTask.execute(ScpTask.java:257)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.plugins.scp.ScpTask.run(ScpTask.java:120)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.plugins.scp.ScpTask.execute(ScpTask.java:106)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$1(TaskExecutorImpl.java:281)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:224)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:281)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:112)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:71)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:203)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:175)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:122)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:117)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:126)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
error	19-Mar-2018 03:33:10		at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
error	19-Mar-2018 03:33:10		at java.lang.Thread.run(Thread.java:748)
simple	19-Mar-2018 03:33:10	Finalising the build...
simple	19-Mar-2018 03:33:10	Stopping timer.

3 answers

1 vote

It looks like https://jira.atlassian.com/browse/BAM-19712, which is fixed in next minor release planned for this week

0 votes
Charlie Misonne Community Leader Mar 19, 2018

Did your plan move to another project recently? Or was it cloned from another one?

I encountered this behavior in the past. The solution was to delete every task related to the artifacts (artifact definition, artifact download, scp task) and recreate them.

See this bug report as well https://jira.atlassian.com/browse/BAM-15033

WithoutUncheckOption.PNGWithUncheckOption.PNGNo, Plan is not moved to another project and there is no clone. Manually i have created this. 
Problem is that whenever I am selecting "Use SSH custom key" option under Authentication type, its asking to browse and upload keys without any uncheck option.

Thanks everyone . I got the solution, there was some problem with private keys. Now its fine 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Unable to add or edit Bitbucket Cloud repository in Bamboo

On 31 May, a GDPR-related change went live in the Bitbucket Cloud API that resulted in users not being able to create or edit Bitbucket Cloud Linked repositories in Bamboo. This API update removed t...

691 views 2 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you