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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Null pointer execption error while fetching plan using PlanManager.


Can someone please provide a hint as to what could be going wrong, I am using atlassian-sdk to develop a plugin which displays a new tab when a job containing a specific task (RobotTask) is clicked..

I am getting Null pointer exception error for a very simple thing that I am doing which is fetching the Plan by using the planKey and PlanManager.


64: Plan plan = planManager.getPlanByKey(planKey).

I have a valid plan key which is "TPRO1-TPLAN1-JOB1". Even when I try to use "TPRO1-TPLAN1" as the plan key, I still get the exception...


My code looks like this

public boolean shouldDisplay(Map<String, Object> context) {
    	PlanKey planKey = PlanKeys.getPlanKey((String) context.get("planKey"));
        Plan plan = planManager.getPlanByKey(planKey);
        List<TaskDefinition> tasks = plan.getBuildDefinition().getTaskDefinitions();
        for(TaskDefinition task : tasks) {
            if(task.getPluginKey().equals(RobotTask.KEY) ) {
                return true;

        return false;


Below is the stack strace

[INFO] [talledLocalContainer] 2018-05-10 12:14:39,083 ERROR [http-nio-6990-exec-12] [DefaultWebInterfaceManager] Could not evaluate condition 'isode.robot.RobotReportViewCondition@72267783' for descriptor: isode.robotplugin:KeyWebItemRobotReportTab (null)
[INFO] [talledLocalContainer] java.lang.NullPointerException
[INFO] [talledLocalContainer]     at isode.robot.RobotReportViewCondition.shouldDisplay(
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.DefaultWebInterfaceManager.filterFragmentsByCondition(
[INFO] [talledLocalContainer]     at com.atlassian.plugin.web.DefaultWebInterfaceManager.getDisplayableItems(
[INFO] [talledLocalContainer]     at com.atlassian.bamboo.ww2.BambooActionSupport.getWebItemsForSection(
[INFO] [talledLocalContainer]     at sun.reflect.GeneratedMethodAccessor1656.invoke(Unknown Source)
[INFO] [talledLocalContainer]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(
[INFO] [talledLocalContainer]     at java.lang.reflect.Method.invoke(
[INFO] [talledLocalContainer]     at freemarker.ext.beans.BeansWrapper.invokeMethod(
[INFO] [talledLocalContainer]     at freemarker.ext.beans.SimpleMethodModel.exec(
[INFO] [talledLocalContainer]     at freemarker.core.MethodCall._eval(
[INFO] [talledLocalContainer]     at freemarker.core.Expression.eval(
[INFO] [talledLocalContainer]     at freemarker.core.Assignment.accept(
[INFO] [talledLocalContainer]     at freemarker.core.Environment.visit(
[INFO] [talledLocalContainer]     at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(
[INFO] [talledLocalContainer]     at freemarker.core.IteratorBlock$IterationContext.accept(
[INFO] [talledLocalContainer]     at freemarker.core.Environment.visitIteratorBlock(
[INFO] [talledLocalContainer]     at freemarker.core.IteratorBlock.acceptWithResult(
[INFO] [talledLocalContainer]     at freemarker.core.IteratorBlock.accept(
[INFO] [talledLocalContainer]     at freemarker.core.Environment.visit(
[INFO] [talledLocalContainer]     at freemarker.core.Environment.invoke(
[INFO] [talledLocalContainer]     at freemarker.core.UnifiedCall.accept(
[INFO] [talledLocalContainer]     at freemarker.core.Environment.visit(
[INFO] [talledLocalContainer]     at freemarker.core.Environment.visit(
[INFO] [talledLocalContainer]     at freemarker.core.Environment.invoke(

1 comment

I found what the problem was, I did not have the constructor to do the initialization.

Below solved it.

public RobotReportViewCondition(final PlanManager planManager){
this.planManager = planManager;


Log in or Sign up to comment
Community showcase
Published in Bamboo

Bamboo 7.2 is here!

I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...

146 views 2 5
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