Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28161

Gerrit trigger NPE on report and event

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Blocker
    • Resolution: Unresolved
    • Component/s: gerrit-trigger-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.607
      gerrit trigger 2.11, 2.12 and 2.13
    • Similar Issues:

      Description

      On a gerrit event, the gerrit trigger fails with NPE:

      Apr 29, 2015 6:04:43 PM com.sonyericsson.hudson.plugins.gerrit.gerritevents.GerritHandler notifyListener
      SEVERE: Exception thrown during event handling.
      java.lang.NullPointerException
      at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.model.BuildMemory$GerritTriggeredEventComparator.compare(BuildMemory.java:63)
      at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.model.BuildMemory$GerritTriggeredEventComparator.compare(BuildMemory.java:60)
      at java.util.TreeMap.getEntryUsingComparator(TreeMap.java:368)
      at java.util.TreeMap.getEntry(TreeMap.java:339)
      at java.util.TreeMap.get(TreeMap.java:272)
      at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.model.BuildMemory.isBuilding(BuildMemory.java:295)
      at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ToGerritRunListener.isBuilding(ToGerritRunListener.java:264)
      at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.gerritEvent(GerritTrigger.java:979)
      at com.sonyericsson.hudson.plugins.gerrit.gerritevents.GerritHandler.notifyListener(GerritHandler.java:328)
      at com.sonyericsson.hudson.plugins.gerrit.gerritevents.GerritHandler.notifyListeners(GerritHandler.java:290)
      at com.sonyericsson.hudson.plugins.gerrit.gerritevents.workers.AbstractGerritEventWork.perform(AbstractGerritEventWork.java:45)
      at com.sonyericsson.hudson.plugins.gerrit.gerritevents.workers.AbstractJsonObjectWork.perform(AbstractJsonObjectWork.java:57)
      at com.sonyericsson.hudson.plugins.gerrit.gerritevents.workers.StreamEventsStringWork.perform(StreamEventsStringWork.java:66)
      at com.sonyericsson.hudson.plugins.gerrit.gerritevents.workers.EventThread.run(EventThread.java:65)

      And on a job finished it also throws NPE on:

      Apr 29, 2015 5:53:09 PM hudson.model.listeners.RunListener report
      WARNING: RunListener failed
      java.lang.NullPointerException
      at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.model.BuildMemory$GerritTriggeredEventComparator.compare(BuildMemory.java:63)
      at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.model.BuildMemory$GerritTriggeredEventComparator.compare(BuildMemory.java:60)
      at java.util.TreeMap.getEntryUsingComparator(TreeMap.java:368)
      at java.util.TreeMap.getEntry(TreeMap.java:339)
      at java.util.TreeMap.get(TreeMap.java:272)
      at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.model.BuildMemory.started(BuildMemory.java:168)
      at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ToGerritRunListener.onStarted(ToGerritRunListener.java:150)
      at com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.ToGerritRunListener.onStarted(ToGerritRunListener.java:54)
      at hudson.model.listeners.RunListener.fireStarted(RunListener.java:213)
      at hudson.model.Run.execute(Run.java:1737)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:374)

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Robert Sandell
          Path:
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/BuildMemory.java
          src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/GerritTriggeredEventComparatorTest.java
          http://jenkins-ci.org/commit/gerrit-trigger-plugin/d8577ac936bbf7e0d1100ea7d0cfbe92310fa858
          Log:
          Fix JENKINS-28161

          This just fixes the NPE symptoms, but I'm afraid that
          the reason that an event has a null value has some deeper issue somewhere.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/BuildMemory.java src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/GerritTriggeredEventComparatorTest.java http://jenkins-ci.org/commit/gerrit-trigger-plugin/d8577ac936bbf7e0d1100ea7d0cfbe92310fa858 Log: Fix JENKINS-28161 This just fixes the NPE symptoms, but I'm afraid that the reason that an event has a null value has some deeper issue somewhere.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Robert Sandell
          Path:
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/BuildMemory.java
          src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/GerritTriggeredEventComparatorTest.java
          http://jenkins-ci.org/commit/gerrit-trigger-plugin/4ffe3ac77d5f1f89d788fffe0d0022b6383116b2
          Log:
          Merge pull request #226 from jenkinsci/JENKINS-28161

          Fix JENKINS-28161

          Compare: https://github.com/jenkinsci/gerrit-trigger-plugin/compare/a9de6534418b...4ffe3ac77d5f

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Robert Sandell Path: src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/BuildMemory.java src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/gerritnotifier/model/GerritTriggeredEventComparatorTest.java http://jenkins-ci.org/commit/gerrit-trigger-plugin/4ffe3ac77d5f1f89d788fffe0d0022b6383116b2 Log: Merge pull request #226 from jenkinsci/ JENKINS-28161 Fix JENKINS-28161 Compare: https://github.com/jenkinsci/gerrit-trigger-plugin/compare/a9de6534418b...4ffe3ac77d5f

            People

            • Assignee:
              rsandell rsandell
              Reporter:
              dcaroest David Caro
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: