java.lang.RuntimeException: java.lang.IllegalStateException: Unable to find plan [PROJ-PLAN1]

Atlassian JIRA | Deric Lee | 9 months ago
  1. 0

    h3. Summary Artifact download task breaks when plan is moved. This only affects Artifact Download tasks if they are in the same plan, example, Job A in Stage B downloading artifact from Job A Stage A. h3. Steps to Reproduce # Create a plan with 2 stages with a job in each stage # Create an artifact definition in the first stage job # Create a artifact download task in the second stage job. Set it to point to the first stage # Move the plan to another project h3. Expected Results The source plan of the artifact download task should be updated to point to the new Job key h3. Actual Results The below exception is thrown in the atlassian-bamboo.log file: {noformat} 2016-03-09 21:18:21,763 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-7] [AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.bamboo.event.BuildFinishedEvent[source=com.atlassian.bamboo.build.DefaultBuildExecutionManager@44c46304] job=PROJ2-PLAN1-JOB1 #2] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.bamboo.chains.ChainExecutionManagerImpl.onBuildFinished(com.atlassian.bamboo.event.BuildFinishedEvent), listener=com.atlassian.bamboo.chains.ChainExecutionManagerImpl@7e9032a0}] java.lang.RuntimeException: java.lang.IllegalStateException: Unable to find plan [PROJ-PLAN1] 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to find plan [PROJ-PLAN1] {noformat} In the task configuration, the source plan is still pointing to the old JOB key. h3.Workaround Manually update the artifact download task to select the proper source job

    Atlassian JIRA | 9 months ago | Deric Lee [Atlassian]
    java.lang.RuntimeException: java.lang.IllegalStateException: Unable to find plan [PROJ-PLAN1]
  2. 0

    h3. Summary Artifact download task breaks when plan is moved. This only affects Artifact Download tasks if they are in the same plan, example, Job A in Stage B downloading artifact from Job A Stage A. h3. Steps to Reproduce # Create a plan with 2 stages with a job in each stage # Create an artifact definition in the first stage job # Create a artifact download task in the second stage job. Set it to point to the first stage # Move the plan to another project h3. Expected Results The source plan of the artifact download task should be updated to point to the new Job key h3. Actual Results The below exception is thrown in the atlassian-bamboo.log file: {noformat} 2016-03-09 21:18:21,763 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-7] [AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.bamboo.event.BuildFinishedEvent[source=com.atlassian.bamboo.build.DefaultBuildExecutionManager@44c46304] job=PROJ2-PLAN1-JOB1 #2] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.bamboo.chains.ChainExecutionManagerImpl.onBuildFinished(com.atlassian.bamboo.event.BuildFinishedEvent), listener=com.atlassian.bamboo.chains.ChainExecutionManagerImpl@7e9032a0}] java.lang.RuntimeException: java.lang.IllegalStateException: Unable to find plan [PROJ-PLAN1] 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:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to find plan [PROJ-PLAN1] {noformat} In the task configuration, the source plan is still pointing to the old JOB key. h3.Workaround Manually update the artifact download task to select the proper source job

    Atlassian JIRA | 9 months ago | Deric Lee
    java.lang.RuntimeException: java.lang.IllegalStateException: Unable to find plan [PROJ-PLAN1]
  3. 0

    h3. Summary Moving certain plan will have the error "cannot save merged build definitions" h3. Steps to Reproduce # Create two Projects: ProjectA and ProjectB # Create PlanA in ProjectA and PlanB in ProjectB # Set PlanA to have produce a ArtifactA # Set PlanB to have "Artifact download" task to download ArtifactA # Create a branch plan in PlanB # Move PlanA from ProjectA to ProjectB h3. Expected Results Move successfully h3. Actual Results Move fail with the error message "Transaction rolled back because it has been marked as rollback-only" in the UI. The below exception is thrown in the atlassian-bamboo.log file: {noformat} 2016-06-08 16:35:18,441 INFO [http-nio-8085-exec-9] [TransactionalPlanMover] Finished updating artifacts 2016-06-08 16:35:51,616 ERROR [http-nio-8085-exec-9] [AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.bamboo.chains.events.ChainMovingEvent[source=com.atlassian.bamboo.plan.move.TransactionalPlanMover@1830b4d9] plan=SHD-TOOL] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.bamboo.plugins.artifact.ArtifactDownloaderTaskEventListener.onChainMoving(com.atlassian.bamboo.chains.events.ChainMovingEvent), listener=com.atlassian.bamboo.plugins.artifact.ArtifactDownloaderTaskEventListener@129d624c}] java.lang.RuntimeException: cannot save merged build definitions at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:46) at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:105) at com.atlassian.bamboo.event.spi.BambooEventDispatcher.dispatch(BambooEventDispatcher.java:38) at com.atlassian.event.internal.LockFreeEventPublisher$Publisher.dispatch(LockFreeEventPublisher.java:260) at com.atlassian.event.internal.LockFreeEventPublisher.publish(LockFreeEventPublisher.java:102) at com.atlassian.bamboo.plan.move.TransactionalPlanMover$1.run(TransactionalPlanMover.java:281) at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:192) at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:182) at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:132) at com.atlassian.bamboo.plan.move.TransactionalPlanMover.publishChainMovingEvent(TransactionalPlanMover.java:276) at com.atlassian.bamboo.plan.move.TransactionalPlanMover.moveSinglePlan(TransactionalPlanMover.java:202) at com.atlassian.bamboo.plan.move.TransactionalPlanMover.moveMaster(TransactionalPlanMover.java:139) ... Caused by: java.lang.IllegalArgumentException: cannot save merged build definitions at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) at com.atlassian.bamboo.plan.PlanHibernateDao.save(PlanHibernateDao.java:456) at com.atlassian.bamboo.plan.PlanHibernateDao.save(PlanHibernateDao.java:51) at sun.reflect.GeneratedMethodAccessor1139.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ... 2016-06-08 16:35:51,916 ERROR [http-nio-8085-exec-9] [MoveBuilds] Unable to move plans com.atlassian.bamboo.plan.MovePlansException: org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only at com.atlassian.bamboo.plan.move.MovePlanBatchCoordinator.movePlans(MovePlanBatchCoordinator.java:58) at com.atlassian.bamboo.plan.move.MovePlanServiceImpl.movePlansToProject(MovePlanServiceImpl.java:37) at com.atlassian.bamboo.ww2.actions.build.admin.MoveBuilds.execute(MoveBuilds.java:158) 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:497) {noformat} h3.Workaround # Click on the Move button again OR # Remove the "Artifact download" task first before moving the plan again h3. Notes # The first workaround depends on the number of tasks and branch plans #* If there are two "Artifact download" tasks to download ArtifactA and two branch plans in PlanB, the number of time to click on the Move button is (2 x 2 + 1) = 5 #* If there are other plans with "Artifact download" tasks that will download ArtifactA and have branch plans as well, the number will increase too, eg: PlanB have 2 "Artifact download" tasks and 2 branch plans = 2 x 2 = 4 PlanC have 3 "Artifact download" tasks and 4 branch plans = 3 x 4 = 12 Total number to click Move button = 4 + 12 + 1 # Incorrect setting in "Artifact download" task #* If PlanB have two stages and both stages have "Artifact download" task to download ArtifactA, only the second stage in PlanB is updated to refer to the correct project. The first stage is still referring to the ProjectA #* Running the build will have an error even though the "Artifact download" task is disabled

    Atlassian JIRA | 6 months ago | Kah Loun Foong [Atlassian]
    java.lang.RuntimeException: cannot save merged build definitions
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 83#143812446

    GitHub | 1 year ago | wadahiro
    java.lang.RuntimeException: You are not permitted to access this resource
  6. 0

    [WEBHOOKS-95] OsgiWebHookProviderWebHookRegistry has flawed locking logic - Ecosystem JIRA

    atlassian.net | 1 year ago
    java.lang.RuntimeException: attempt to unlock read lock, not locked by current thread

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      java.lang.IllegalStateException: Unable to find plan [PROJ-PLAN1]

      at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke()
    2. com.atlassian.event
      AsynchronousAbleEventDispatcher$1$1.run
      1. com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54)
      2. com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:46)
      2 frames
    3. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      2 frames
    4. com.atlassian.bamboo
      ImpersonationHelper$1.run
      1. com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
      2. com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
      3. com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
      4. com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
      4 frames
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame