java.lang.NullPointerException

Atlassian JIRA | Hendrik Payer | 1 year ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    h1. Description Retrieving http://localhost:8085/rest/api/latest/result/TEST-TEST.json?expand=results.result.vcsRevisions.vcsRevision.changes.change fails with NullPointerException when it contains a build referencing a commit and the corresponding repository has been deleted. However, displaying the build, commit etc. in the web interface seems to work. {noformat} java.lang.NullPointerException at com.atlassian.bamboo.plugins.rest.model.build.change.RestChange.expand(RestChange.java:134) at com.atlassian.bamboo.plugins.rest.model.build.change.RestChangeExpander.expandInternal(RestChangeExpander.java:12) at com.atlassian.bamboo.plugins.rest.model.build.change.RestChangeExpander.expandInternal(RestChangeExpander.java:5) at com.atlassian.plugins.rest.common.expand.AbstractRecursiveEntityExpander.expand(AbstractRecursiveEntityExpander.java:9) [...] {noformat} h1. Reproduce the issue * Create a new Plan (e.g. TEST) using a Git or Subversion repository (Job with only checkout task suffices) * Trigger the build of the plan manually * Commit and push a change to the repository * Let Bamboo build the plan with the change (using Repository polling trigger) * Modify the plan: remove repository * Might be optional: add the same repository again * Open REST URL http://localhost:8085/rest/api/latest/result/TEST-TEST.json?expand=results.result.vcsRevisions.vcsRevision.changes.change (assuming both project and job have key "TEST")

    Atlassian JIRA | 1 year ago | Hendrik Payer
    java.lang.NullPointerException
  2. 0

    h1. Description Retrieving http://localhost:8085/rest/api/latest/result/TEST-TEST.json?expand=results.result.vcsRevisions.vcsRevision.changes.change fails with NullPointerException when it contains a build referencing a commit and the corresponding repository has been deleted. However, displaying the build, commit etc. in the web interface seems to work. {noformat} java.lang.NullPointerException at com.atlassian.bamboo.plugins.rest.model.build.change.RestChange.expand(RestChange.java:134) at com.atlassian.bamboo.plugins.rest.model.build.change.RestChangeExpander.expandInternal(RestChangeExpander.java:12) at com.atlassian.bamboo.plugins.rest.model.build.change.RestChangeExpander.expandInternal(RestChangeExpander.java:5) at com.atlassian.plugins.rest.common.expand.AbstractRecursiveEntityExpander.expand(AbstractRecursiveEntityExpander.java:9) [...] {noformat} h1. Reproduce the issue * Create a new Plan (e.g. TEST) using a Git or Subversion repository (Job with only checkout task suffices) * Trigger the build of the plan manually * Commit and push a change to the repository * Let Bamboo build the plan with the change (using Repository polling trigger) * Modify the plan: remove repository * Might be optional: add the same repository again * Open REST URL http://localhost:8085/rest/api/latest/result/TEST-TEST.json?expand=results.result.vcsRevisions.vcsRevision.changes.change (assuming both project and job have key "TEST")

    Atlassian JIRA | 1 year ago | Hendrik Payer
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.bamboo.plugins.rest.model.build.change.RestChange.expand()
    2. com.atlassian.bamboo
      RestChangeExpander.expandInternal
      1. com.atlassian.bamboo.plugins.rest.model.build.change.RestChange.expand(RestChange.java:134)
      2. com.atlassian.bamboo.plugins.rest.model.build.change.RestChangeExpander.expandInternal(RestChangeExpander.java:12)
      3. com.atlassian.bamboo.plugins.rest.model.build.change.RestChangeExpander.expandInternal(RestChangeExpander.java:5)
      3 frames
    3. com.atlassian.plugins
      AbstractRecursiveEntityExpander.expand
      1. com.atlassian.plugins.rest.common.expand.AbstractRecursiveEntityExpander.expand(AbstractRecursiveEntityExpander.java:9)
      1 frame