Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bamboo specs troubleshooting

Maclean IT January 11, 2018

I am getting the following error in the logs when trying to run a bamboo spec following upgrading from 6.2.3 to 6.3.1.

Can anyone point me in the direction of the source of the error or how to improve any logging/troubleshooting. I've checked permissions/setup of the linked repo and it looks fine.

2018-01-11 13:31:10,763 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-11] [AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.stash.plugin.remote.event.StashBranchChangedRemoteEvent@585c3607[branchName=master,repositoryProject=EC,repositorySlug=maclean.ecommerce.postalservice,committer=scott.mackay,sourceId=f257c719-103d-37da-b07d-f35b80a360ee,sourceUrl=http://sourcecode:7990]] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.bamboo.plugins.stash.events.BranchChangedEventListener.onBranchChangedEvent(com.atlassian.stash.plugin.remote.event.StashBranchChangedRemoteEvent), listener=com.atlassian.bamboo.plugins.stash.events.BranchChangedEventListener@699ae07a}]
java.lang.RuntimeException: Unable to locate pom.xml file in C:\bamboo-home\xml-data\build-dir\serverSide\REPOSITORY_STORED_SPECS\repository-5275654\checkout\bamboo-specs
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
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:748)
Caused by: java.lang.IllegalStateException: Unable to locate pom.xml file in C:\bamboo-home\xml-data\build-dir\serverSide\REPOSITORY_STORED_SPECS\repository-5275654\checkout\bamboo-specs
at com.google.common.base.Preconditions.checkState(Preconditions.java:197)
at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.resolveSpecsPom(RepositoryStoredSpecsServiceImpl.java:435)
at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.generateBambooYamlsFromSpecs(RepositoryStoredSpecsServiceImpl.java:396)
at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.processSpecs(RepositoryStoredSpecsServiceImpl.java:329)
at com.atlassian.bamboo.configuration.external.RepositoryStoredSpecsServiceImpl.runBambooSpecs(RepositoryStoredSpecsServiceImpl.java:263)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at com.sun.proxy.$Proxy398.runBambooSpecs(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy1375.runBambooSpecs(Unknown Source)
at com.atlassian.bamboo.plugins.stash.events.BranchChangedEventListener.lambda$handleRefsChange$2(BranchChangedEventListener.java:182)
at java.util.Optional.ifPresent(Optional.java:159)
at com.atlassian.bamboo.plugins.stash.events.BranchChangedEventListener.handleRefsChange(BranchChangedEventListener.java:179)
at com.atlassian.bamboo.plugins.stash.events.BranchChangedEventListener.onBranchChangedEvent(BranchChangedEventListener.java:155)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36)
... 8 more

 

1 answer

0 votes
Grzegorz Lewandowski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 12, 2018

Your Bamboo Specs pom.xml is missing. Are you sure Bamboo Specs Maven project is in a right directory (bamboo-specs) ?

Here's a tutorial how to get started with Bamboo Specs stored in Bitbucket Server repository 

Maclean IT January 15, 2018

Thanks, I have a follow up questions and some notes.

1. Is a pom.xml now required?
This was building the spec without one in 6.2.3 and I find no reference to one being required in the docs - https://docs.atlassian.com/bamboo-specs-docs/6.3.1/specs-java.html

nor any example of what one contains provided anywhere.
Yes I am using the directory name exactly as it is specified in the documentation.

I tried to follow the tutorial but 
a) I do not use maven and none of our projects are java
b) I could not get maven to create the archetype behind our corporate proxy.
c) Why should I need to create a maven/java project + dev environment in every project I want to build on bamboo, it seems like way too high a price to pay for config as code?

It often seems like bamboo doesn't give much thought to those who don't use java...

 


You don't require the inclusion of a yaml parsers or external dependencies to use a yaml spec, why is the java spec now different?

Grzegorz Lewandowski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 16, 2018

IIRC, there were changes in RSS security handling and now RSS code is executed in different context. I suppose that happened in your case, you can refer to Security Administration to get more details. 

 

Java was chosen as high level language to aid in configuration of complex plans. You don't have to use Maven or Java in your project to use RSS. Those can be easily encapsulated in bamboo-specs directory. 

If you don't need high level of customization which Java based Specs gives you, you can always use simplified YAML based ones. More information here:
https://confluence.atlassian.com/bamboo/tutorial-bamboo-specs-yaml-stored-in-bitbucket-server-941616819.html

https://confluence.atlassian.com/bamboo/bamboo-yaml-938844479.html

Maclean IT January 17, 2018

"Those can be easily encapsulated in bamboo-specs directory"

But the tutorial states that to generate a demo project I should download and install maven, java + IDE. 

Basically all I need is an example of the pom.xml required but this is not anywhere I can find in your documentation as I'd rather not download and install GB's,, configure proxies, request corporate network changes etc just to get one.

Can you provide any kind of example of what the pom.xml should be and update your documentation to state that both a .spec file AND a pom.xml are required in the bamboo-specs folder?

Foong
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 24, 2018

Use the following example command to generate the Bamboo Java Specs files:

mvn archetype:generate -B \
  -DarchetypeGroupId=com.atlassian.bamboo -DarchetypeArtifactId=bamboo-specs-archetype \
  -DarchetypeVersion=6.3.1 \
  -DgroupId=com.my.company -DartifactId=bamboo-specs \
  -Dversion=1.0.0-SNAPSHOT -Dpackage=com.my.company

For more info, refer to Tutorial: Bamboo Java Specs stored in Bitbucket Server 

Like Jeyanthan I likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events