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

NullPointerException apparently caused by JENKINS-73355

      JENKINS-55342 added hashtag support. This is causing a Null Pointer Exception:

      2025-02-24 15:16:15.091+0000 [id=98]    WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID 6a672eda-9f63-4ccc-a884-ee10c2f1274a
      java.lang.NullPointerException
              at java.base/java.util.Objects.requireNonNull(Objects.java:209)
              at java.base/java.lang.String.join(String.java:3325)
              at PluginClassLoader for gerrit-trigger//com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerParameters.setOrCreateParametersForChangeBasedEvent(GerritTriggerParameters.java:527)
              at PluginClassLoader for gerrit-trigger//com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerParameters.setOrCreateParameters(GerritTriggerParameters.java:453)
              at PluginClassLoader for gerrit-trigger//com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.createParameters(EventListener.java:352)
              at PluginClassLoader for gerrit-trigger//com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.schedule(EventListener.java:282)
              at PluginClassLoader for gerrit-trigger//com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.retriggerThisBuild(GerritTrigger.java:863)
              at PluginClassLoader for gerrit-trigger//com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.actions.RetriggerAction.doIndex(RetriggerAction.java:150)
              at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732)
              at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:484)
              at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:497)
              at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:218)
              at org.kohsuke.stapler.SelectionInterceptedFunction$Adapter.invoke(SelectionInterceptedFunction.java:37)
              at org.kohsuke.stapler.verb.HttpVerbInterceptor.invoke(HttpVerbInterceptor.java:48)
              at org.kohsuke.stapler.SelectionInterceptedFunction.bindAndInvoke(SelectionInterceptedFunction.java:26)
              at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:140)
              at org.kohsuke.stapler.MetaClass$12.doDispatch(MetaClass.java:686)
              at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:61)
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:800)
        

      Going back to 2.40.0 we do not have this issue, it is present in 2.41.0, 2.41.1 and 2.42.0.

      Context: Upgrading a Jenkins 2.401.3 installation with gerrit-trigger 2.39.1, saw this issue with 2.42.0. Reverting to 2.40.0 is okay.
      Gerrit version is 3.11.0

      Looking at line 527 (https://github.com/jenkinsci/gerrit-trigger-plugin/blob/master/src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/GerritTriggerParameters.java#L527) appears to link it with the Hashtag feature

          [JENKINS-75328] NullPointerException apparently caused by JENKINS-73355

          Steve added a comment - - edited

          Just to add - upgrading Jenkins to current LTS - 2.492.1, on AWS Linux 2023 (Fedora-based) via the RPM (baseurl=https://pkg.jenkins.io/redhat-stable)

          Also to clarify, we do not use Hashtags in our Gerrit commits.

          Steve added a comment - - edited Just to add - upgrading Jenkins to current LTS - 2.492.1, on AWS Linux 2023 (Fedora-based) via the RPM (baseurl= https://pkg.jenkins.io/redhat-stable ) Also to clarify, we do not use Hashtags in our Gerrit commits.

          Steve added a comment - - edited

          Comparing some other environments we have, the plugin itself is working in certain combinations:

          Jenkins Plugin Comments
          2.440.1 2.42.0 Works
          2.482 2.41.1 Works
          2.492.1 2.40.0 Breaks on higher versions of the plugin
               

          Steve added a comment - - edited Comparing some other environments we have, the plugin itself is working in certain combinations: Jenkins Plugin Comments 2.440.1 2.42.0 Works 2.482 2.41.1 Works 2.492.1 2.40.0 Breaks on higher versions of the plugin      

          Steve added a comment -

          Can it be related to removing commons-compress from Jenkins Core?
          https://github.com/jenkinsci/jenkins/pull/9958 - from https://issues.jenkins.io/browse/JENKINS-73355
          2.482 still contained commons-compress, but 2.492.1 does not.
          Previous LTS, 2.479.3, also works.

          So has JENKINS-73355 broken gerrit-trigger?

          Steve added a comment - Can it be related to removing commons-compress from Jenkins Core? https://github.com/jenkinsci/jenkins/pull/9958 - from https://issues.jenkins.io/browse/JENKINS-73355 2.482 still contained commons-compress, but 2.492.1 does not. Previous LTS, 2.479.3, also works. So has JENKINS-73355 broken gerrit-trigger?

            rsandell rsandell
            steveparker Steve
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: