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

Error by creating notification #82

Closed muchino closed 6 years ago

muchino commented 6 years ago

Hi Michael We moved to a new bamboo instance and our plans not working as before. We get the following error during plan creation:

Any ideas?

error 18-May-2018 14:11:45 Error occurred while running Task 'Configure Sandbox Plan(2)' of type ch.mibex.bamboo.plandsl:seed.task. error 18-May-2018 14:11:45 org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [insert into NOTIFICATIONS (RECIPIENT_TYPE, RECIPIENT, NOTIFICATION_SET, CONDITION_KEY, CONDITION_DATA, NOTIFICATION_RULE_ID) values (?, ?, ?, ?, ?, ?)]; constraint [notifications_unique]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch error 18-May-2018 14:11:45 at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:247) error 18-May-2018 14:11:45 at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:386) error 18-May-2018 14:11:45 at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:335) error 18-May-2018 14:11:45 at com.atlassian.bamboo.deployments.environments.persistence.EnvironmentDaoImpl.getEnvironmentsForDeploymentProject(EnvironmentDaoImpl.java:58) error 18-May-2018 14:11:45 at sun.reflect.GeneratedMethodAccessor3533.invoke(Unknown Source) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) error 18-May-2018 14:11:45 at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) error 18-May-2018 14:11:45 at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) error 18-May-2018 14:11:45 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) error 18-May-2018 14:11:45 at com.sun.proxy.$Proxy209.getEnvironmentsForDeploymentProject(Unknown Source) error 18-May-2018 14:11:45 at com.atlassian.bamboo.deployments.environments.service.EnvironmentServiceImpl.getEnvironmentsForDeploymentProject(EnvironmentServiceImpl.java:207) error 18-May-2018 14:11:45 at sun.reflect.GeneratedMethodAccessor2520.invoke(Unknown Source) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) error 18-May-2018 14:11:45 at com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:24) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) error 18-May-2018 14:11:45 at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) error 18-May-2018 14:11:45 at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) error 18-May-2018 14:11:45 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) error 18-May-2018 14:11:45 at com.sun.proxy.$Proxy218.getEnvironmentsForDeploymentProject(Unknown Source) error 18-May-2018 14:11:45 at sun.reflect.GeneratedMethodAccessor2520.invoke(Unknown Source) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) error 18-May-2018 14:11:45 at com.sun.proxy.$Proxy408.getEnvironmentsForDeploymentProject(Unknown Source) error 18-May-2018 14:11:45 at sun.reflect.GeneratedMethodAccessor2520.invoke(Unknown Source) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136) error 18-May-2018 14:11:45 at com.sun.proxy.$Proxy408.getEnvironmentsForDeploymentProject(Unknown Source) error 18-May-2018 14:11:45 at com.atlassian.bamboo.deployments.environments.service.EnvironmentService$getEnvironmentsForDeploymentProject.call(Unknown Source) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.services.EnvironmentService.findBambooEnvironment(EnvironmentService.groovy:428) error 18-May-2018 14:11:45 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) error 18-May-2018 14:11:45 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) error 18-May-2018 14:11:45 at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384) error 18-May-2018 14:11:45 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.services.EnvironmentService$_reorderEnvironments_closure2.doCall(EnvironmentService.groovy:72) error 18-May-2018 14:11:45 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) error 18-May-2018 14:11:45 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) error 18-May-2018 14:11:45 at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) error 18-May-2018 14:11:45 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021) error 18-May-2018 14:11:45 at groovy.lang.Closure.call(Closure.java:426) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.eachWithIndex(DefaultGroovyMethods.java:1946) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.eachWithIndex(DefaultGroovyMethods.java:1926) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.eachWithIndex(DefaultGroovyMethods.java:1976) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.dgm$174.invoke(Unknown Source) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.services.EnvironmentService.reorderEnvironments(EnvironmentService.groovy:71) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.services.EnvironmentService.createOrUpdate(EnvironmentService.groovy:58) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.services.EnvironmentService$createOrUpdate.call(Unknown Source) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService.handleEnvironments(DeploymentProjectService.groovy:91) error 18-May-2018 14:11:45 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) error 18-May-2018 14:11:45 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) error 18-May-2018 14:11:45 at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384) error 18-May-2018 14:11:45 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService$_createOrUpdate_closure1$_closure4$_closure5.doCall(DeploymentProjectService.groovy:39) error 18-May-2018 14:11:45 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) error 18-May-2018 14:11:45 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) error 18-May-2018 14:11:45 at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) error 18-May-2018 14:11:45 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021) error 18-May-2018 14:11:45 at groovy.lang.Closure.call(Closure.java:426) error 18-May-2018 14:11:45 at groovy.lang.Closure.call(Closure.java:442) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService$_createOrUpdate_closure1$_closure4.doCall(DeploymentProjectService.groovy:29) error 18-May-2018 14:11:45 at sun.reflect.GeneratedMethodAccessor3319.invoke(Unknown Source) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) error 18-May-2018 14:11:45 at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) error 18-May-2018 14:11:45 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021) error 18-May-2018 14:11:45 at groovy.lang.Closure.call(Closure.java:426) error 18-May-2018 14:11:45 at groovy.lang.Closure.call(Closure.java:442) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService$_createOrUpdate_closure1.doCall(DeploymentProjectService.groovy:28) error 18-May-2018 14:11:45 at sun.reflect.GeneratedMethodAccessor3318.invoke(Unknown Source) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) error 18-May-2018 14:11:45 at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) error 18-May-2018 14:11:45 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021) error 18-May-2018 14:11:45 at groovy.lang.Closure.call(Closure.java:426) error 18-May-2018 14:11:45 at groovy.lang.Closure.call(Closure.java:442) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2056) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService.createOrUpdate(DeploymentProjectService.groovy:27) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.services.DeploymentProjectService$createOrUpdate.call(Unknown Source) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.PlanDslExecutorImpl$3.doInTransaction(PlanDslExecutorImpl.groovy:108) error 18-May-2018 14:11:45 at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21) error 18-May-2018 14:11:45 at com.atlassian.sal.spring.component.SpringHostContextAccessor$1.doInTransaction(SpringHostContextAccessor.java:71) error 18-May-2018 14:11:45 at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) error 18-May-2018 14:11:45 at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:68) error 18-May-2018 14:11:45 at sun.reflect.GeneratedMethodAccessor172.invoke(Unknown Source) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) error 18-May-2018 14:11:45 at com.sun.proxy.$Proxy372.doInTransaction(Unknown Source) error 18-May-2018 14:11:45 at sun.reflect.GeneratedMethodAccessor172.invoke(Unknown Source) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) error 18-May-2018 14:11:45 at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) error 18-May-2018 14:11:45 at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) error 18-May-2018 14:11:45 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) error 18-May-2018 14:11:45 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) error 18-May-2018 14:11:45 at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) error 18-May-2018 14:11:45 at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) error 18-May-2018 14:11:45 at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) error 18-May-2018 14:11:45 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) error 18-May-2018 14:11:45 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) error 18-May-2018 14:11:45 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) error 18-May-2018 14:11:45 at com.sun.proxy.$Proxy611.doInTransaction(Unknown Source) error 18-May-2018 14:11:45 at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18) error 18-May-2018 14:11:45 at sun.reflect.GeneratedMethodAccessor190.invoke(Unknown Source) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) error 18-May-2018 14:11:45 at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) error 18-May-2018 14:11:45 at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) error 18-May-2018 14:11:45 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) error 18-May-2018 14:11:45 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) error 18-May-2018 14:11:45 at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) error 18-May-2018 14:11:45 at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) error 18-May-2018 14:11:45 at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) error 18-May-2018 14:11:45 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) error 18-May-2018 14:11:45 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) error 18-May-2018 14:11:45 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) error 18-May-2018 14:11:45 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) error 18-May-2018 14:11:45 at com.sun.proxy.$Proxy1222.execute(Unknown Source) error 18-May-2018 14:11:45 at com.atlassian.sal.api.transaction.TransactionTemplate$execute.call(Unknown Source) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.PlanDslExecutorImpl.execute(PlanDslExecutorImpl.groovy:104) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.PlanDslExecutor$execute.call(Unknown Source) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.task.SeedTask$_execute_closure1$_closure4.doCall(SeedTask.groovy:53) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.task.SeedTask$_execute_closure1$_closure4.doCall(SeedTask.groovy) error 18-May-2018 14:11:45 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) error 18-May-2018 14:11:45 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) error 18-May-2018 14:11:45 at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) error 18-May-2018 14:11:45 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021) error 18-May-2018 14:11:45 at groovy.lang.Closure.call(Closure.java:426) error 18-May-2018 14:11:45 at groovy.lang.Closure.call(Closure.java:420) error 18-May-2018 14:11:45 at com.atlassian.bamboo.utils.BambooRunnables$BambooRunnableFromCallable.run(BambooRunnables.java:65) error 18-May-2018 14:11:45 at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26) error 18-May-2018 14:11:45 at com.atlassian.bamboo.applinks.ImpersonationServiceImpl$1.call(ImpersonationServiceImpl.java:74) error 18-May-2018 14:11:45 at java_util_concurrent_Callable$call.call(Unknown Source) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.task.SeedTask$_execute_closure1.doCall(SeedTask.groovy:55) error 18-May-2018 14:11:45 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) error 18-May-2018 14:11:45 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) error 18-May-2018 14:11:45 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) error 18-May-2018 14:11:45 at java.lang.reflect.Method.invoke(Method.java:498) error 18-May-2018 14:11:45 at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) error 18-May-2018 14:11:45 at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) error 18-May-2018 14:11:45 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021) error 18-May-2018 14:11:45 at groovy.lang.Closure.call(Closure.java:426) error 18-May-2018 14:11:45 at groovy.lang.Closure.call(Closure.java:442) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2068) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.dgm$164.invoke(Unknown Source) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) error 18-May-2018 14:11:45 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) error 18-May-2018 14:11:45 at ch.mibex.bamboo.plandsl.plugin.task.SeedTask.execute(SeedTask.groovy:49) error 18-May-2018 14:11:45 at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$2(TaskExecutorImpl.java:283) error 18-May-2018 14:11:45 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:224) error 18-May-2018 14:11:45 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:283) error 18-May-2018 14:11:45 at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:112) error 18-May-2018 14:11:45 at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:71) error 18-May-2018 14:11:45 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:203) error 18-May-2018 14:11:45 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:175) error 18-May-2018 14:11:45 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:122) error 18-May-2018 14:11:45 at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185) error 18-May-2018 14:11:45 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:117) error 18-May-2018 14:11:45 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:126) error 18-May-2018 14:11:45 at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48) error 18-May-2018 14:11:45 at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26) error 18-May-2018 14:11:45 at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17) error 18-May-2018 14:11:45 at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41) error 18-May-2018 14:11:45 at java.lang.Thread.run(Thread.java:748) error 18-May-2018 14:11:45 Caused by: org.hibernate.exception.ConstraintViolationException: could not execute batch error 18-May-2018 14:11:45 at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112) error 18-May-2018 14:11:45 at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) error 18-May-2018 14:11:45 at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) error 18-May-2018 14:11:45 at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:121) error 18-May-2018 14:11:45 at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:97) error 18-May-2018 14:11:45 at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:147) error 18-May-2018 14:11:45 at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:206) error 18-May-2018 14:11:45 at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:611) error 18-May-2018 14:11:45 at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:456) error 18-May-2018 14:11:45 at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337) error 18-May-2018 14:11:45 at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:50) error 18-May-2018 14:11:45 at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1396) error 18-May-2018 14:11:45 at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1889) error 18-May-2018 14:11:45 at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:366) error 18-May-2018 14:11:45 at com.atlassian.bamboo.deployments.environments.persistence.EnvironmentDaoImpl$2.doInHibernate(EnvironmentDaoImpl.java:66) error 18-May-2018 14:11:45 at com.atlassian.bamboo.deployments.environments.persistence.EnvironmentDaoImpl$2.doInHibernate(EnvironmentDaoImpl.java:58) error 18-May-2018 14:11:45 at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:383) error 18-May-2018 14:11:45 ... 239 more error 18-May-2018 14:11:45 Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into NOTIFICATIONS (RECIPIENT_TYPE, RECIPIENT, NOTIFICATION_SET, CONDITION_KEY, CONDITION_DATA, NOTIFICATION_RULE_ID) values ('com.atlassian.bamboo.plugins.bamboo-hipchat:recipient.hipchat', '2b95AU18itURJW4TnQwvqBhSIJ60T0sCkBhMxjYD|true|4329928', 1835070, 'bamboo.deployments:deploymentFailed', '', 2982709) was aborted: ERROR: duplicate key value violates unique constraint "notifications_unique" error 18-May-2018 14:11:45 Detail: Key (recipient_type, recipient, notification_set, condition_key, condition_data)=(com.atlassian.bamboo.plugins.bamboo-hipchat:recipient.hipchat, 2b95AU18itURJW4TnQwvqBhSIJ60T0sCkBhMxjYD|true|4329928, 1835070, bamboo.deployments:deploymentFailed, ) already exists. Call getNextException to see other errors in the batch. error 18-May-2018 14:11:45 at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:148) error 18-May-2018 14:11:45 at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2126) error 18-May-2018 14:11:45 at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:469) error 18-May-2018 14:11:45 at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:791) error 18-May-2018 14:11:45 at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1547) error 18-May-2018 14:11:45 at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:2544) error 18-May-2018 14:11:45 at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:111) error 18-May-2018 14:11:45 ... 252 more error 18-May-2018 14:11:45 Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "notifications_unique" error 18-May-2018 14:11:45 Detail: Key (recipient_type, recipient, notification_set, condition_key, condition_data)=(com.atlassian.bamboo.plugins.bamboo-hipchat:recipient.hipchat, 2b95AU18itURJW4TnQwvqBhSIJ60T0sCkBhMxjYD|true|4329928, 1835070, bamboo.deployments:deploymentFailed, ) already exists. error 18-May-2018 14:11:45 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2412) error 18-May-2018 14:11:45 at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2125) error 18-May-2018 14:11:45 ... 257 more

muchino commented 6 years ago

Hi Michael

If I remove the Notification from the deployment project - it works. is there a change needed with bamboo 6.5?

package dsls.utilities

import ch.mibex.bamboo.plandsl.dsl.BambooEnvironment import ch.mibex.bamboo.plandsl.dsl.notifications.EnvironmentNotifications import ch.mibex.bamboo.plandsl.dsl.notifications.Notifications import dsls.utilities.config.BambooGlobalVariables

static def notifyWithHipChatAndSms(Notifications notifications, BambooEnvironment env) { notifications.with {

    hipchat(event: NotificationEvent.FAILED_BUILDS_AND_FIRST_SUCCESSFUL,
            apiToken: env(BambooGlobalVariables.HIPCHAT_TOKEN),
            room: env(BambooGlobalVariables.HIPCHAT_ROOM_BUILDOK)
    ) {
        notifyParticipants false
    }
}

}

static def notifyDeployment(EnvironmentNotifications notifications, BambooEnvironment env) {

notifications.with {

    hipchat(event: Notifications.NotificationEvent.DEPLOYMENT_FAILED,
            apiToken: env(BambooGlobalVariables.HIPCHAT_TOKEN),
            room: env(BambooGlobalVariables.HIPCHAT_ROOM_BUILDOK)
    ) {
        notifyParticipants true
    }

    hipchat(event: Notifications.NotificationEvent.DEPLOYMENT_FINISHED,
            apiToken: env(BambooGlobalVariables.HIPCHAT_TOKEN),
            room: env(BambooGlobalVariables.HIPCHAT_ROOM_BUILDOK)
    ) {
        notifyParticipants false
    }
}

}

mrueegg commented 6 years ago

Hi @muchino

Please excuse my late response. With which plug-in version does this happen? I'm not aware of any changes necessary for Bamboo 6.5. When you say that you removed the notifications from the environment, did you do it manually in the Bamboo UI and then re-run the seed task?

Best regards, Michael

muchino commented 6 years ago

We are using the version 1.9.13. I stopped Bamboo, cleared the notification table via SQL ;) and then I could run the task again. In the second run - it failed with the mentioned issue.

mrueegg commented 6 years ago

Hi Oli,

Please excuse my late response.

We've just released a new version including a bug fix for this. Please update your plug-in installation.

Thanks again for reporting it!

Best regards, Michael