Remote Agents: Source code checkout with Plastic SCM doesn't work
Asked by GeraldAT:

We use Plastic SCM ([www.plasticscm.com](http://www.plasticscm.com)) as source code management tool. There is a plugin provided by codice software (Plastic SCM vendir) which works fine with local agents. But on remote agents it doesn't work. I get following error:

```
Starting task 'Checkout Default Repository' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout'Updating source code to revision: 32Updating source code to revision: 32Updating source code to revision: 32Error occurred while running Task 'Checkout Default Repository(1)'. This build will fail. Caused by:java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: An error occurred when updating workspace.        at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:119)        at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:79)        at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:174)        at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:109)        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:183)        at com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:67)        at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:67)        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:204)        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:103)        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:109)        at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52)        at java.lang.Thread.run(Thread.java:662)Caused by: com.atlassian.bamboo.repository.RepositoryException: An error occurred when updating workspace.        at com.codicesoftware.plugins.bamboo40.changesproviders.PlasticContinuousIntegrationMode.updateWorkspace(PlasticContinuousIntegrationMode.java:106)        at com.codicesoftware.plugins.bamboo40.PlasticRepository.retrieveSourceCode(PlasticRepository.java:115)        at com.codicesoftware.plugins.bamboo40.PlasticRepository.retrieveSourceCode(PlasticRepository.java:101)        at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(VcsCheckoutTask.java:180)        at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$100(VcsCheckoutTask.java:46)        at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$1.call(VcsCheckoutTask.java:114)        at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$1.call(VcsCheckoutTask.java:110)        at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:100)        ... 11 moreCaused by: java.lang.NullPointerException        at com.codicesoftware.plugins.bamboo40.PlasticClient.getCmExePath(PlasticClient.java:15)        at com.codicesoftware.plastic.core.EnviromentManager.getCmExePath(Unknown Source)        at com.codicesoftware.plastic.core.PlasticShell.initShell(Unknown Source)        at com.codicesoftware.plastic.core.PlasticShell.execute(Unknown Source)        at com.codicesoftware.plastic.commands.GetWorkspaceFromPathCommand.execute(Unknown Source)        at com.codicesoftware.plugins.bamboo40.changesproviders.WorkspaceManager.getWorkpsaceInfoFromPath(WorkspaceManager.java:50)        at com.codicesoftware.plugins.bamboo40.changesproviders.WorkspaceManager.workspaceAlreadyExists(WorkspaceManager.java:43)        at com.codicesoftware.plugins.bamboo40.changesproviders.WorkspaceManager.createWorkspace(WorkspaceManager.java:61)        at com.codicesoftware.plugins.bamboo40.changesproviders.PlasticContinuousIntegrationMode$1.call(PlasticContinuousIntegrationMode.java:93)        at com.codicesoftware.plugins.bamboo40.changesproviders.PlasticContinuousIntegrationMode$1.call(PlasticContinuousIntegrationMode.java:90)        at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:324)        at com.codicesoftware.plugins.bamboo40.changesproviders.PlasticContinuousIntegrationMode.updateWorkspace(PlasticContinuousIntegrationMode.java:89)        ... 18 more
```

In the codice support forum they say it's an issue on Atlassian site. <http://www.plasticscm.net/index.php?/topic/867-trying-to-get-bamboo-to-work-with-plastic/page__st__20>

The plastic client is correctly installed on the remote agent and works when I try to update locally on the remote agent.


Answers:
author: Przemek Bruski
body: The exception you've linked (NPE in Plastic plugin) looks different than the one you've linked on Plastic forums.

We won't be able to help you, we don't have access to the source code - you'll have more luck asking on Plastic forums.

While doing it, please ask whether they would be willing to open source the plugin.

comments: author: Przemek Bruski
body: I've pinged them, let's see what they say.


author: GeraldAT
body: I talked to a support guy of codice software. he asked whethere I can give him a contact mail address of you guys but I didn't find one. So you may drop him a line on support at codicesoftware dot com


author: Przemek Bruski
body: They've opensourced the plugin, I've committed a fix that should get you past this error.


author: Przemek Bruski
body: The exception you've linked (NPE in Plastic plugin) looks different than the one you've linked on Plastic forums.

We won't be able to help you, we don't have access to the source code - you'll have more luck asking on Plastic forums.

While doing it, please ask whether they would be willing to open source the plugin.


author: GeraldAT
body: Well, I guess not (I haven't seen any source code anywhere) but the codice guys are usually very responsive. (<http://www.plasticscm.com/support.aspx>)


author: PiotrA
body: Stupid question, but is the Plastic scm plugin for Bamboo open-sourced? So we could peek at the sources? Probably not, but I better ask...


Tags: plastic

remote

remote-agent

source-control