Getting errors when using configuration as code
Asked by Venku Jayanti:

I am using bamboo 6.2.5. I pushed the configuration code to bitbucket and that triggered the creation of the new bamboo plan. But the creation of plan failed because of some errors:

```
[ERROR] Failed to execute goal com.atlassian.bamboo:bamboo-specs-runner:6.2.5:run (default-cli) on project bamboo-specs-generator: Execution default-cli of goal com.atlassian.bamboo:bamboo-specs-runner:6.2.5:run failed: java.lang.reflect.InvocationTargetException: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.atlassian.bamboo.specs.util.IsolatedYamlizator$$Lambda$11/1566285515 -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionExceptionUnable to scan repository Bamboospec (181403753) for Bamboo Specscom.atlassian.bamboo.repository.RepositoryException: Unable to scan repository Bamboospec (181403753) for Bamboo Specs	at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runSpecs$9(RepositoryStoredSpecsServiceImpl.java:501)	at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl$$Lambda$1963/1078711827.call(Unknown Source)	at java.util.concurrent.FutureTask.run(FutureTask.java:266)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)	at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:47)	at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)	at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)	at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)	at java.lang.Thread.run(Thread.java:745)Caused by: com.atlassian.utils.process.ProcessException: Non-zero exit code: 1	at com.atlassian.utils.process.PluggableProcessHandler.complete(PluggableProcessHandler.java:69)	at com.atlassian.utils.process.ExternalProcessImpl.wrapUpProcess(ExternalProcessImpl.java:667)	at com.atlassian.utils.process.ExternalProcessImpl.finish(ExternalProcessImpl.java:161)	at com.atlassian.utils.process.ExternalProcessImpl.execute(ExternalProcessImpl.java:114)	at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runSpecs$9(RepositoryStoredSpecsServiceImpl.java:488)	... 9 more
```


Answers:
author: Boris Hinzer
body: We had the same issue while we were trying to deploy with Maven. The cause was, that the repo in Bitbucket was existing - but empty. After we successfully pushed an initial commit to master, the plan was successfully created during the next maven run.


author: Venku Jayanti
body: ![Screen Shot 2019-04-18 at 9.52.56 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/51994i3015C5772CECFC86/image-size/large?v=v2&px=999 "Screen Shot 2019-04-18 at 9.52.56 AM.png")The error is fixed once the settings are right. Once a new change is pushed to specs repo, the plan gets updated. Venku

comments: author: Venku Jayanti
body: Other option is upgrading Docker to latest version on Bamboo server, which something I'll test in future.


author: Gabriel Ribeiro
body: Hi Venku,

This error is usually related to outdated JDK version, Could please update Java to the latest version of JDK 1.8 and run the specs again?

Thank you.

best,  
Gabriel Ribeiro

comments: author: vamshi9700
body: Hi Gabriel,

I am facing the similar issue , checked the version of Java it is running with the latest JDK 1.8 but still the Javaspecs are unable to Publish .Those are working good when i push them manually.Could you please help me here

```
[ERROR] Failed to execute goal com.atlassian.bamboo:bamboo-specs-runner:6.4.0:run (default-cli) on project bamboo-specs-generator: Execution default-cli of goal com.atlassian.bamboo:bamboo-specs-runner:6.4.0:run failed: java.lang.reflect.InvocationTargetException: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.atlassian.bamboo.specs.util.IsolatedYamlizator$$Lambda$11/614785733 -> [Help 1][ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionExceptionUnable to scan repository Bamboospec (28934167) for Bamboo Specscom.atlassian.bamboo.repository.RepositoryException: Unable to scan repository Bamboospec (28934167) for Bamboo Specs at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runSpecsWithMaven$9(RepositoryStoredSpecsServiceImpl.java:737) at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl$$Lambda$1711/51512301.call(Unknown Source) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41) at java.lang.Thread.run(Thread.java:745)Caused by: com.atlassian.utils.process.ProcessException: Non-zero exit code: 1 at com.atlassian.utils.process.PluggableProcessHandler.complete(PluggableProcessHandler.java:69) at com.atlassian.utils.process.ExternalProcessImpl.wrapUpProcess(ExternalProcessImpl.java:667) at com.atlassian.utils.process.ExternalProcessImpl.finish(ExternalProcessImpl.java:161) at com.atlassian.utils.process.ExternalProcessImpl.execute(ExternalProcessImpl.java:114) at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.lambda$runSpecsWithMaven$9(RepositoryStoredSpecsServiceImpl.java:724)

```


Tags: spec