mibexsoftware / bamboo-plan-dsl-plugin

Configuration as code with a Groovy-based DSL or YAML for Atlassian Bamboo.
https://marketplace.atlassian.com/plugins/ch.mibex.bamboo.plandsl/
Other
40 stars 16 forks source link

IllegalArgumentException: Principal required - Creating a Deployment Project #68

Open karsaroth opened 6 years ago

karsaroth commented 6 years ago

Version: 1.9.7 Bamboo Version: 6.1.0

Getting this strange error when trying to run my previously successful seed project on a new server. It doesn't look like it's something to do with the seed code.

Previously successful on: 1.9.6 Bamboo Version: 6.1.0

simple  08-Nov-2017 14:40:22    Plan DSL: created deployment project Deploy ESB api-helloworld-v1.
error   08-Nov-2017 14:40:22    Error occurred while running Task 'Takes the Bamboo Seed project and runs it to make other build and deployment projects.(2)' of type ch.mibex.bamboo.plandsl:seed.task.
error   08-Nov-2017 14:40:22    java.lang.IllegalArgumentException: Principal required
error   08-Nov-2017 14:40:22        at org.springframework.util.Assert.hasText(Assert.java:168)
error   08-Nov-2017 14:40:22        at org.acegisecurity.acls.sid.PrincipalSid.<init>(PrincipalSid.java:40)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.security.acegi.acls.BambooAclUpdateHelper.modifyAclAces(BambooAclUpdateHelper.java:647)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.security.acegi.acls.HibernateMutableAclServiceImpl.updateAclAces(HibernateMutableAclServiceImpl.java:156)
error   08-Nov-2017 14:40:22        at sun.reflect.GeneratedMethodAccessor3388.invoke(Unknown Source)
error   08-Nov-2017 14:40:22        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   08-Nov-2017 14:40:22        at java.lang.reflect.Method.invoke(Method.java:498)
error   08-Nov-2017 14:40:22        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
error   08-Nov-2017 14:40:22        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
error   08-Nov-2017 14:40:22        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
error   08-Nov-2017 14:40:22        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
error   08-Nov-2017 14:40:22        at com.sun.proxy.$Proxy76.updateAclAces(Unknown Source)
error   08-Nov-2017 14:40:22        at sun.reflect.GeneratedMethodAccessor3388.invoke(Unknown Source)
error   08-Nov-2017 14:40:22        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   08-Nov-2017 14:40:22        at java.lang.reflect.Method.invoke(Method.java:498)
error   08-Nov-2017 14:40:22        at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
error   08-Nov-2017 14:40:22        at com.sun.proxy.$Proxy269.updateAclAces(Unknown Source)
error   08-Nov-2017 14:40:22        at sun.reflect.GeneratedMethodAccessor3388.invoke(Unknown Source)
error   08-Nov-2017 14:40:22        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   08-Nov-2017 14:40:22        at java.lang.reflect.Method.invoke(Method.java:498)
error   08-Nov-2017 14:40:22        at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136)
error   08-Nov-2017 14:40:22        at com.sun.proxy.$Proxy269.updateAclAces(Unknown Source)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.security.acegi.acls.HibernateMutableAclService$updateAclAces$0.call(Unknown Source)
error   08-Nov-2017 14:40:22        at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService.handleProjectPermissions(DeploymentProjectService.groovy:108)
error   08-Nov-2017 14:40:22        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
error   08-Nov-2017 14:40:22        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
error   08-Nov-2017 14:40:22        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   08-Nov-2017 14:40:22        at java.lang.reflect.Method.invoke(Method.java:498)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   08-Nov-2017 14:40:22        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
error   08-Nov-2017 14:40:22        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
error   08-Nov-2017 14:40:22        at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService$_createOrUpdate_closure1$_closure4$_closure5.doCall(DeploymentProjectService.groovy:38)
error   08-Nov-2017 14:40:22        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
error   08-Nov-2017 14:40:22        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
error   08-Nov-2017 14:40:22        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   08-Nov-2017 14:40:22        at java.lang.reflect.Method.invoke(Method.java:498)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   08-Nov-2017 14:40:22        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   08-Nov-2017 14:40:22        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   08-Nov-2017 14:40:22        at groovy.lang.Closure.call(Closure.java:426)
error   08-Nov-2017 14:40:22        at groovy.lang.Closure.call(Closure.java:442)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
error   08-Nov-2017 14:40:22        at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService$_createOrUpdate_closure1$_closure4.doCall(DeploymentProjectService.groovy:29)
error   08-Nov-2017 14:40:22        at sun.reflect.GeneratedMethodAccessor3534.invoke(Unknown Source)
error   08-Nov-2017 14:40:22        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   08-Nov-2017 14:40:22        at java.lang.reflect.Method.invoke(Method.java:498)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   08-Nov-2017 14:40:22        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   08-Nov-2017 14:40:22        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   08-Nov-2017 14:40:22        at groovy.lang.Closure.call(Closure.java:426)
error   08-Nov-2017 14:40:22        at groovy.lang.Closure.call(Closure.java:442)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
error   08-Nov-2017 14:40:22        at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService$_createOrUpdate_closure1.doCall(DeploymentProjectService.groovy:28)
error   08-Nov-2017 14:40:22        at sun.reflect.GeneratedMethodAccessor3533.invoke(Unknown Source)
error   08-Nov-2017 14:40:22        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   08-Nov-2017 14:40:22        at java.lang.reflect.Method.invoke(Method.java:498)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   08-Nov-2017 14:40:22        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   08-Nov-2017 14:40:22        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   08-Nov-2017 14:40:22        at groovy.lang.Closure.call(Closure.java:426)
error   08-Nov-2017 14:40:22        at groovy.lang.Closure.call(Closure.java:442)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
error   08-Nov-2017 14:40:22        at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService.createOrUpdate(DeploymentProjectService.groovy:27)
error   08-Nov-2017 14:40:22        at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService$createOrUpdate.call(Unknown Source)
error   08-Nov-2017 14:40:22        at ch.mibex.bamboo.plandsl.plugin.PlanDslExecutorImpl$3.doInTransaction(PlanDslExecutorImpl.groovy:108)
error   08-Nov-2017 14:40:22        at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)
error   08-Nov-2017 14:40:22        at com.atlassian.sal.spring.component.SpringHostContextAccessor$1.doInTransaction(SpringHostContextAccessor.java:71)
error   08-Nov-2017 14:40:22        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
error   08-Nov-2017 14:40:22        at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:68)
error   08-Nov-2017 14:40:22        at sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source)
error   08-Nov-2017 14:40:22        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   08-Nov-2017 14:40:22        at java.lang.reflect.Method.invoke(Method.java:498)
error   08-Nov-2017 14:40:22        at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
error   08-Nov-2017 14:40:22        at com.sun.proxy.$Proxy338.doInTransaction(Unknown Source)
error   08-Nov-2017 14:40:22        at sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source)
error   08-Nov-2017 14:40:22        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   08-Nov-2017 14:40:22        at java.lang.reflect.Method.invoke(Method.java:498)
error   08-Nov-2017 14:40:22        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
error   08-Nov-2017 14:40:22        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
error   08-Nov-2017 14:40:22        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   08-Nov-2017 14:40:22        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
error   08-Nov-2017 14:40:22        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   08-Nov-2017 14:40:22        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
error   08-Nov-2017 14:40:22        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   08-Nov-2017 14:40:22        at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   08-Nov-2017 14:40:22        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
error   08-Nov-2017 14:40:22        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
error   08-Nov-2017 14:40:22        at com.sun.proxy.$Proxy561.doInTransaction(Unknown Source)
error   08-Nov-2017 14:40:22        at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)
error   08-Nov-2017 14:40:22        at sun.reflect.GeneratedMethodAccessor262.invoke(Unknown Source)
error   08-Nov-2017 14:40:22        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   08-Nov-2017 14:40:22        at java.lang.reflect.Method.invoke(Method.java:498)
error   08-Nov-2017 14:40:22        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
error   08-Nov-2017 14:40:22        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
error   08-Nov-2017 14:40:22        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   08-Nov-2017 14:40:22        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
error   08-Nov-2017 14:40:22        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   08-Nov-2017 14:40:22        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
error   08-Nov-2017 14:40:22        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   08-Nov-2017 14:40:22        at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   08-Nov-2017 14:40:22        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
error   08-Nov-2017 14:40:22        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error   08-Nov-2017 14:40:22        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
error   08-Nov-2017 14:40:22        at com.sun.proxy.$Proxy1471.execute(Unknown Source)
error   08-Nov-2017 14:40:22        at com.atlassian.sal.api.transaction.TransactionTemplate$execute.call(Unknown Source)
error   08-Nov-2017 14:40:22        at ch.mibex.bamboo.plandsl.plugin.PlanDslExecutorImpl.execute(PlanDslExecutorImpl.groovy:104)
error   08-Nov-2017 14:40:22        at ch.mibex.bamboo.plandsl.plugin.PlanDslExecutor$execute.call(Unknown Source)
error   08-Nov-2017 14:40:22        at ch.mibex.bamboo.plandsl.plugin.task.SeedTask$_execute_closure1$_closure3.doCall(SeedTask.groovy:54)
error   08-Nov-2017 14:40:22        at ch.mibex.bamboo.plandsl.plugin.task.SeedTask$_execute_closure1$_closure3.doCall(SeedTask.groovy)
error   08-Nov-2017 14:40:22        at sun.reflect.GeneratedMethodAccessor3505.invoke(Unknown Source)
error   08-Nov-2017 14:40:22        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   08-Nov-2017 14:40:22        at java.lang.reflect.Method.invoke(Method.java:498)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   08-Nov-2017 14:40:22        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   08-Nov-2017 14:40:22        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   08-Nov-2017 14:40:22        at groovy.lang.Closure.call(Closure.java:426)
error   08-Nov-2017 14:40:22        at groovy.lang.Closure.call(Closure.java:420)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.utils.BambooRunnables$BambooRunnableFromCallable.run(BambooRunnables.java:64)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.applinks.ImpersonationServiceImpl$1.call(ImpersonationServiceImpl.java:74)
error   08-Nov-2017 14:40:22        at java_util_concurrent_Callable$call.call(Unknown Source)
error   08-Nov-2017 14:40:22        at ch.mibex.bamboo.plandsl.plugin.task.SeedTask$_execute_closure1.doCall(SeedTask.groovy:56)
error   08-Nov-2017 14:40:22        at sun.reflect.GeneratedMethodAccessor3504.invoke(Unknown Source)
error   08-Nov-2017 14:40:22        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error   08-Nov-2017 14:40:22        at java.lang.reflect.Method.invoke(Method.java:498)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
error   08-Nov-2017 14:40:22        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
error   08-Nov-2017 14:40:22        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
error   08-Nov-2017 14:40:22        at groovy.lang.Closure.call(Closure.java:426)
error   08-Nov-2017 14:40:22        at groovy.lang.Closure.call(Closure.java:442)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2068)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.dgm$164.invoke(Unknown Source)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
error   08-Nov-2017 14:40:22        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
error   08-Nov-2017 14:40:22        at ch.mibex.bamboo.plandsl.plugin.task.SeedTask.execute(SeedTask.groovy:50)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$2(TaskExecutorImpl.java:282)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:223)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:282)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:111)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:71)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:185)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:120)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:113)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:113)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:126)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:47)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
error   08-Nov-2017 14:40:22        at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
error   08-Nov-2017 14:40:22        at java.lang.Thread.run(Thread.java:748)
mrueegg commented 6 years ago

Thanks for your feedback. To be able to reproduce this, could you please provide me a DSL example? The problem occurs in the deployment project permissions, so it will probably be enough to have that part.

karsaroth commented 6 years ago

Sure, I've cut down my dsl to the following, which still triggers the above error:

project(key: 'SDTST', name: 'Seed Test') {
  plan(key: 'SDTP', name: 'Seed Plan') {
    description "Tests Bamboo Seed"
    branches {
      autoBranchManagement {
        createPlanBranchesForAllNewBranches()
        deletePlanBranchesAfterDays 7
        doNotDeleteInactivePlanBranches()
      }
    }
    stage(name: 'Build Stage') {
      job(key: 'BUILDJOB', name: 'Default Job') {
        tasks {
          cleanWorkingDirectory() {
            description 'Clean the working directory'
          }
        }
        artifacts {
          definition(name: "Seed Artifact", copyPattern: '*.json') {
            shared true
          }
        }
      }
    }
    deploymentProject(name: "Test Deploy") {
      releaseVersioning('${bamboo.buildResultKey}-release-1') {
        autoIncrement()
      }
      environment(name: 'Test Seed Env') {
        tasks {
          cleanWorkingDirectory() {
            description 'Clean the working directory'
          }
        }
      }
    }
  }
}

Remove the deploymentProject element and it works.

mrueegg commented 6 years ago

Thanks a lot for the DSL. Unfortunately, I was not able to reproduce this error with 1.9.7 under Bamboo 6.1.

Maybe it is related to the permissions of the user running the seed task. What permissions does the user you trigger the build have? And have you configured a user in the task settings in the field "Bamboo user to run the script as"?

karsaroth commented 6 years ago

That was it, there was no user configured - I had assumed it would run as the triggering user, but that didn't seem to work right. Once I'd added my username as the user to run as, the issue was resolved.

mrueegg commented 6 years ago

You're right, configuring deployment projects and environments needs a configured user in the seed task. Actually, I run the creation of the DSL objects under the user that triggered the build in case no user is configured in the seed task, but somehow deployment projects and environments require a configured user. I haven't yet spotted the difference why this is the case. I'll therefore leave this ticket open and investigate this further.