java.lang.NullPointerException

Atlassian JIRA | Martin Meinhold | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    We've tried to rolled back a deployment release to a previous version but Bamboo failed to download the release artifact because the build result had already been cleaned up. I guess the artifacts are still on S3 but Bamboo failed to generate the proper link. From my understanding, build expiry and deployment artifacts are decoupled and purging the producing build should not impact the deployment of a release. {noformat} 2014-12-10 05:16:40,178 INFO [http-bio-8085-exec-50] [AccessLogFilter] <user> GET http://intsys-bamboo.internal.atlassian.com/build/artifactUrlRedirect.action?planKey=XXX-YYY&buildNumber=111&artifactName=Foo%20Bar 2613074kb 2014-12-10 05:16:40,183 WARN [http-bio-8085-exec-50] [ResultsSummaryAwareInteceptor] Action com.atlassian.bamboo.ww2.actions.chains.ArtifactUrlRedirectAction' is resultsSummaryAware but no resultSummary can be found for XXX-YYY-111 2014-12-10 05:16:40,186 ERROR [http-bio-8085-exec-50] [ExceptionMappingInterceptor] null java.lang.NullPointerException at com.atlassian.bamboo.ww2.actions.chains.ArtifactUrlRedirectAction.getArtifactLink(ArtifactUrlRedirectAction.java:83) at com.atlassian.bamboo.ww2.actions.chains.ArtifactUrlRedirectAction.execute(ArtifactUrlRedirectAction.java:26) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) {noformat} -Applied workaround: turn off expiry of build results (so only expire build artifacts and build logs).- I'm not aware of a workaround. But we've disabled the expiry of build results on all Bamboo servers so this won't happen for releases created in the past week. It seems for the moment, releases older than our one week expiry period cannot be used for a rollback. *Clarification:* the problem here is _not_ deployment expiry; it is actually disabled. The problem is that while performing the rollback, the code ({{ArtifactUrlRedirectAction}}) tries to find the build result that created the artifacts in the first place (similar like clicking on one of the artifacts in the screenshot below). But this build result had been expired. So the query fails and the rollback as well. Nevertheless, the deployment artifacts are still existing on S3. !Screenshot - 231214.png!

    Atlassian JIRA | 2 years ago | Martin Meinhold
    java.lang.NullPointerException
  2. 0

    We've tried to rolled back a deployment release to a previous version but Bamboo failed to download the release artifact because the build result had already been cleaned up. I guess the artifacts are still on S3 but Bamboo failed to generate the proper link. From my understanding, build expiry and deployment artifacts are decoupled and purging the producing build should not impact the deployment of a release. {noformat} 2014-12-10 05:16:40,178 INFO [http-bio-8085-exec-50] [AccessLogFilter] <user> GET http://intsys-bamboo.internal.atlassian.com/build/artifactUrlRedirect.action?planKey=XXX-YYY&buildNumber=111&artifactName=Foo%20Bar 2613074kb 2014-12-10 05:16:40,183 WARN [http-bio-8085-exec-50] [ResultsSummaryAwareInteceptor] Action com.atlassian.bamboo.ww2.actions.chains.ArtifactUrlRedirectAction' is resultsSummaryAware but no resultSummary can be found for XXX-YYY-111 2014-12-10 05:16:40,186 ERROR [http-bio-8085-exec-50] [ExceptionMappingInterceptor] null java.lang.NullPointerException at com.atlassian.bamboo.ww2.actions.chains.ArtifactUrlRedirectAction.getArtifactLink(ArtifactUrlRedirectAction.java:83) at com.atlassian.bamboo.ww2.actions.chains.ArtifactUrlRedirectAction.execute(ArtifactUrlRedirectAction.java:26) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) {noformat} -Applied workaround: turn off expiry of build results (so only expire build artifacts and build logs).- I'm not aware of a workaround. But we've disabled the expiry of build results on all Bamboo servers so this won't happen for releases created in the past week. It seems for the moment, releases older than our one week expiry period cannot be used for a rollback. *Clarification:* the problem here is _not_ deployment expiry; it is actually disabled. The problem is that while performing the rollback, the code ({{ArtifactUrlRedirectAction}}) tries to find the build result that created the artifacts in the first place (similar like clicking on one of the artifacts in the screenshot below). But this build result had been expired. So the query fails and the rollback as well. Nevertheless, the deployment artifacts are still existing on S3. !Screenshot - 231214.png!

    Atlassian JIRA | 2 years ago | Martin Meinhold
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.bamboo.ww2.actions.chains.ArtifactUrlRedirectAction.getArtifactLink()
    2. com.atlassian.bamboo
      ArtifactUrlRedirectAction.execute
      1. com.atlassian.bamboo.ww2.actions.chains.ArtifactUrlRedirectAction.getArtifactLink(ArtifactUrlRedirectAction.java:83)
      2. com.atlassian.bamboo.ww2.actions.chains.ArtifactUrlRedirectAction.execute(ArtifactUrlRedirectAction.java:26)
      2 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames