java.lang.NullPointerException

Jenkins JIRA | Peter Cawley | 3 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    We're observing the following NPE, which is causing builds to spuriously fail: {code} 18:21:55 FATAL: null 18:21:55 java.lang.NullPointerException 18:21:55 at hudson.plugins.im.tools.BuildHelper.isFix(BuildHelper.java:69) 18:21:55 at hudson.plugins.im.build_notify.SummaryOnlyBuildToChatNotifier.buildCompletionMessage(SummaryOnlyBuildToChatNotifier.java:34) 18:21:55 at hudson.plugins.im.IMPublisher.notifyChatsOnBuildEnd(IMPublisher.java:577) 18:21:55 at hudson.plugins.im.IMPublisher.notifyOnBuildEnd(IMPublisher.java:304) 18:21:55 at hudson.plugins.im.IMPublisher$1.endBuild(IMPublisher.java:718) 18:21:55 at hudson.matrix.MatrixBuild$MatrixBuildExecution.post2(MatrixBuild.java:407) 18:21:55 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:658) 18:21:55 at hudson.model.Run.execute(Run.java:1731) 18:21:55 at hudson.matrix.MatrixBuild.run(MatrixBuild.java:306) 18:21:55 at hudson.model.ResourceController.execute(ResourceController.java:88) 18:21:55 at hudson.model.Executor.run(Executor.java:231) 18:21:55 at hudson.model.OneOffExecutor.run(OneOffExecutor.java:43) {code} The line reported by the tip of the stack trace would seem to be the middle {{return}} statement in the following: {code} @Deprecated public static boolean isFix(AbstractBuild<?, ?> build) { if (build.getResult() != Result.SUCCESS) { return false; } AbstractBuild<?, ?> previousBuild = getPreviousNonAbortedBuild(build); if (previousBuild != null) { return previousBuild.getResult().isWorseThan(Result.SUCCESS); } return false; } {code} The job in question is configured to allow multiple concurrent builds, at which point it seems plausible that {{previousBuild}} ends up being set to a build that is still in progress, causing {{getResult}} to return {{null}}.

    Jenkins JIRA | 3 years ago | Peter Cawley
    java.lang.NullPointerException
  2. 0

    We're observing the following NPE, which is causing builds to spuriously fail: {code} 18:21:55 FATAL: null 18:21:55 java.lang.NullPointerException 18:21:55 at hudson.plugins.im.tools.BuildHelper.isFix(BuildHelper.java:69) 18:21:55 at hudson.plugins.im.build_notify.SummaryOnlyBuildToChatNotifier.buildCompletionMessage(SummaryOnlyBuildToChatNotifier.java:34) 18:21:55 at hudson.plugins.im.IMPublisher.notifyChatsOnBuildEnd(IMPublisher.java:577) 18:21:55 at hudson.plugins.im.IMPublisher.notifyOnBuildEnd(IMPublisher.java:304) 18:21:55 at hudson.plugins.im.IMPublisher$1.endBuild(IMPublisher.java:718) 18:21:55 at hudson.matrix.MatrixBuild$MatrixBuildExecution.post2(MatrixBuild.java:407) 18:21:55 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:658) 18:21:55 at hudson.model.Run.execute(Run.java:1731) 18:21:55 at hudson.matrix.MatrixBuild.run(MatrixBuild.java:306) 18:21:55 at hudson.model.ResourceController.execute(ResourceController.java:88) 18:21:55 at hudson.model.Executor.run(Executor.java:231) 18:21:55 at hudson.model.OneOffExecutor.run(OneOffExecutor.java:43) {code} The line reported by the tip of the stack trace would seem to be the middle {{return}} statement in the following: {code} @Deprecated public static boolean isFix(AbstractBuild<?, ?> build) { if (build.getResult() != Result.SUCCESS) { return false; } AbstractBuild<?, ?> previousBuild = getPreviousNonAbortedBuild(build); if (previousBuild != null) { return previousBuild.getResult().isWorseThan(Result.SUCCESS); } return false; } {code} The job in question is configured to allow multiple concurrent builds, at which point it seems plausible that {{previousBuild}} ends up being set to a build that is still in progress, causing {{getResult}} to return {{null}}.

    Jenkins JIRA | 3 years ago | Peter Cawley
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at hudson.plugins.im.tools.BuildHelper.isFix()
    2. Hudson instant-messaging plugin
      IMPublisher$1.endBuild
      1. hudson.plugins.im.tools.BuildHelper.isFix(BuildHelper.java:69)
      2. hudson.plugins.im.build_notify.SummaryOnlyBuildToChatNotifier.buildCompletionMessage(SummaryOnlyBuildToChatNotifier.java:34)
      3. hudson.plugins.im.IMPublisher.notifyChatsOnBuildEnd(IMPublisher.java:577)
      4. hudson.plugins.im.IMPublisher.notifyOnBuildEnd(IMPublisher.java:304)
      5. hudson.plugins.im.IMPublisher$1.endBuild(IMPublisher.java:718)
      5 frames
    3. Hudson
      OneOffExecutor.run
      1. hudson.matrix.MatrixBuild$MatrixBuildExecution.post2(MatrixBuild.java:407)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:658)
      3. hudson.model.Run.execute(Run.java:1731)
      4. hudson.matrix.MatrixBuild.run(MatrixBuild.java:306)
      5. hudson.model.ResourceController.execute(ResourceController.java:88)
      6. hudson.model.Executor.run(Executor.java:231)
      7. hudson.model.OneOffExecutor.run(OneOffExecutor.java:43)
      7 frames