It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

An error occurred while publishing plan XXXX-XXXX: Duplicate key 141361704

rwarden I'm New Here Thursday

I am trying to create specs using java code to publish:

mvn -X -Ppublish-specs -Dbamboo.specs.log.level=TRACE

 However, when trying to publish I am getting the following error:

build 26-Mar-2020 12:10:50 2020-03-26 12:10:50,045 TRACE [RestHelper] POST https://<bambo-server>/rest/api/latest/import/plan HTTP/1.1 - sending
build 26-Mar-2020 12:10:51 2020-03-26 12:10:51,971 TRACE [RestHelper] POST https://<bambo-server>/rest/api/latest/import/plan HTTP/1.1 - failed, status: 400, error: Duplicate key 141361704
build 26-Mar-2020 12:10:51 2020-03-26 12:10:51,974 TRACE [RestHelper] {"message":"Duplicate key 141361704","status-code":400}
build 26-Mar-2020 12:10:51 2020-03-26 12:10:51,977 INFO [BambooServer] An error occurred while publishing plan MOLECULETESTS-FDJAFKSJDF: Duplicate key 141361704
build 26-Mar-2020 12:10:51 2020-03-26 12:10:51,979 DEBUG [BambooServer] {"message":"Duplicate key 141361704","status-code":400}

This plan does not exist, e.g. if I try the following:
https://<bambo-server>/exportSpecs/plan.action?buildKey=MOLECULETESTS-FDJAFKSJDF 

Then it will return "Export to Bamboo Specs failed: null" as it does not exist.

How can I find out what key it thinks is duplicated?

1 answer

0 votes

Hi,

It would help narrow down the problem if you can find the full stack trace of this error in the bamboo server logs and post it here.

rwarden I'm New Here Thursday

Here is the full stack:

 

build 26-Mar-2020 12:10:52 [ERROR] Failed to execute goal com.atlassian.bamboo:bamboo-specs-runner:6.5.0:run (default-cli) on project molecule-tests-bamboo-specs: Execution default-cli of goal com.atlassian.bamboo:bamboo-specs-runner:6.5.0:run failed: java.lang.reflect.InvocationTargetException: An error occurred while publishing plan MOLECULETESTS-FDJAFKSJDF: Duplicate key 141361704 -> [Help 1]
build 26-Mar-2020 12:10:52 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.atlassian.bamboo:bamboo-specs-runner:6.5.0:run (default-cli) on project molecule-tests-bamboo-specs: Execution default-cli of goal com.atlassian.bamboo:bamboo-specs-runner:6.5.0:run failed: java.lang.reflect.InvocationTargetException
build 26-Mar-2020 12:10:52 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
build 26-Mar-2020 12:10:52 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
build 26-Mar-2020 12:10:52 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
build 26-Mar-2020 12:10:52 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
build 26-Mar-2020 12:10:52 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
build 26-Mar-2020 12:10:52 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
build 26-Mar-2020 12:10:52 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
build 26-Mar-2020 12:10:52 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
build 26-Mar-2020 12:10:52 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
build 26-Mar-2020 12:10:52 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
build 26-Mar-2020 12:10:52 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
build 26-Mar-2020 12:10:52 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
build 26-Mar-2020 12:10:52 at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
build 26-Mar-2020 12:10:52 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
build 26-Mar-2020 12:10:52 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
build 26-Mar-2020 12:10:52 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
build 26-Mar-2020 12:10:52 at java.lang.reflect.Method.invoke(Method.java:498)
build 26-Mar-2020 12:10:52 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
build 26-Mar-2020 12:10:52 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
build 26-Mar-2020 12:10:52 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
build 26-Mar-2020 12:10:52 at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
build 26-Mar-2020 12:10:52 Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal com.atlassian.bamboo:bamboo-specs-runner:6.5.0:run failed: java.lang.reflect.InvocationTargetException
build 26-Mar-2020 12:10:52 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
build 26-Mar-2020 12:10:52 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
build 26-Mar-2020 12:10:52 ... 20 more
build 26-Mar-2020 12:10:52 Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
build 26-Mar-2020 12:10:52 at com.atlassian.bamboo.specs.maven.sandbox.SpecsRunner.callMainMethod(SpecsRunner.java:100)
build 26-Mar-2020 12:10:52 at com.atlassian.bamboo.specs.maven.sandbox.SpecsRunner.runSpecsInternal(SpecsRunner.java:76)
build 26-Mar-2020 12:10:52 at com.atlassian.bamboo.specs.maven.sandbox.SpecsRunner.runSpecs(SpecsRunner.java:48)
build 26-Mar-2020 12:10:52 at com.atlassian.bamboo.specs.maven.RunBambooSpecsMojo.execute(RunBambooSpecsMojo.java:88)
build 26-Mar-2020 12:10:52 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
build 26-Mar-2020 12:10:52 ... 21 more
build 26-Mar-2020 12:10:52 Caused by: java.lang.reflect.InvocationTargetException
build 26-Mar-2020 12:10:52 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
build 26-Mar-2020 12:10:52 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
build 26-Mar-2020 12:10:52 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
build 26-Mar-2020 12:10:52 at java.lang.reflect.Method.invoke(Method.java:498)
build 26-Mar-2020 12:10:52 at com.atlassian.bamboo.specs.maven.sandbox.SpecsRunner.callMainMethod(SpecsRunner.java:95)
build 26-Mar-2020 12:10:52 ... 25 more
build 26-Mar-2020 12:10:52 Caused by: com.atlassian.bamboo.specs.api.exceptions.BambooSpecsPublishingException: An error occurred while publishing plan MOLECULETESTS-FDJAFKSJDF: Duplicate key 141361704
build 26-Mar-2020 12:10:52 at com.atlassian.bamboo.specs.util.BambooServer.translateRestException(BambooServer.java:178)
build 26-Mar-2020 12:10:52 at com.atlassian.bamboo.specs.util.BambooServer.translateException(BambooServer.java:148)
build 26-Mar-2020 12:10:52 at com.atlassian.bamboo.specs.util.BambooServer.publish(BambooServer.java:101)
build 26-Mar-2020 12:10:52 at specs.main.lambda$main$0(main.java:75)
build 26-Mar-2020 12:10:52 at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
build 26-Mar-2020 12:10:52 at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
build 26-Mar-2020 12:10:52 at specs.main.main(main.java:74)
build 26-Mar-2020 12:10:52 ... 30 more
build 26-Mar-2020 12:10:52 Caused by: com.atlassian.bamboo.specs.exceptions.BambooSpecsRestRequestException: Duplicate key 141361704
build 26-Mar-2020 12:10:52 at com.atlassian.bamboo.specs.util.RestHelper.lambda$sendRequest$2(RestHelper.java:89)
build 26-Mar-2020 12:10:52 at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:222)
build 26-Mar-2020 12:10:52 at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164)
build 26-Mar-2020 12:10:52 at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:139)
build 26-Mar-2020 12:10:52 at com.atlassian.bamboo.specs.util.RestHelper.sendRequest(RestHelper.java:92)
build 26-Mar-2020 12:10:52 at com.atlassian.bamboo.specs.util.RestHelper.post(RestHelper.java:201)
build 26-Mar-2020 12:10:52 at com.atlassian.bamboo.specs.util.SendQueue$1.run(SendQueue.java:23)
build 26-Mar-2020 12:10:52 [ERROR]
build 26-Mar-2020 12:10:52 [ERROR]
build 26-Mar-2020 12:10:52 [ERROR] For more information about the errors and possible solutions, please read the following articles:
build 26-Mar-2020 12:10:52 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
error 26-Mar-2020 12:10:52 Error occurred while running Task 'Run Maven Build(5)' of type com.atlassian.bamboo.plugins.bamboo-docker-plugin:task.docker.cli.
error 26-Mar-2020 12:10:52 com.atlassian.bamboo.task.TaskException: Failed to execute task
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.plugins.docker.service.RunService.execute(RunService.java:75)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.plugins.docker.tasks.cli.DockerCliTask.execute(DockerCliTask.java:70)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$3(TaskExecutorImpl.java:285)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:224)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:285)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:112)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:71)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:203)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:175)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:122)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:117)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:126)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
error 26-Mar-2020 12:10:52 at java.lang.Thread.run(Thread.java:748)
error 26-Mar-2020 12:10:52 Caused by: com.atlassian.bamboo.docker.DockerException: Error running Docker run command
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.docker.DockerContainerServiceImpl.run(DockerContainerServiceImpl.java:118)
error 26-Mar-2020 12:10:52 at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
error 26-Mar-2020 12:10:52 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error 26-Mar-2020 12:10:52 at java.lang.reflect.Method.invoke(Method.java:498)
error 26-Mar-2020 12:10:52 at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
error 26-Mar-2020 12:10:52 at com.sun.proxy.$Proxy94.run(Unknown Source)
error 26-Mar-2020 12:10:52 at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
error 26-Mar-2020 12:10:52 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error 26-Mar-2020 12:10:52 at java.lang.reflect.Method.invoke(Method.java:498)
error 26-Mar-2020 12:10:52 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
error 26-Mar-2020 12:10:52 at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
error 26-Mar-2020 12:10:52 at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
error 26-Mar-2020 12:10:52 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error 26-Mar-2020 12:10:52 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
error 26-Mar-2020 12:10:52 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
error 26-Mar-2020 12:10:52 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error 26-Mar-2020 12:10:52 at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
error 26-Mar-2020 12:10:52 at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
error 26-Mar-2020 12:10:52 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error 26-Mar-2020 12:10:52 at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
error 26-Mar-2020 12:10:52 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error 26-Mar-2020 12:10:52 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
error 26-Mar-2020 12:10:52 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
error 26-Mar-2020 12:10:52 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
error 26-Mar-2020 12:10:52 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
error 26-Mar-2020 12:10:52 at com.sun.proxy.$Proxy152.run(Unknown Source)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.plugins.docker.client.DockerCmd.run(DockerCmd.java:51)
error 26-Mar-2020 12:10:52 at com.atlassian.bamboo.plugins.docker.service.RunService.execute(RunService.java:64)
error 26-Mar-2020 12:10:52 ... 17 more

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.0 is here!

  Hello Community, I’m Martyna Wojtas, product manager on Bamboo, and I'm happy to announce that Bamboo 7.0 is here! In this platform release, we have improved the Bamboo experience for eve...

2,000 views 32 13
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you