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

Gerrit Trigger: NPE on manual trigger

    Details

    • Similar Issues:

      Description

      On the /gerrit_manual_trigger page:

      javax.servlet.ServletException: java.lang.NullPointerException
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:726)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:777)
      at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:381)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:684)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:777)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:586)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:217)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:206)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:179)
      at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:86)
      at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:84)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
      at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:66)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
      at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:118)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:64)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:47)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:331)
      at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:227)
      at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:679)
      Caused by: java.lang.NullPointerException
      at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.actions.manual.ManualTriggerAction.indexResult(ManualTriggerAction.java:319)
      at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.actions.manual.ManualTriggerAction.doBuild(ManualTriggerAction.java:259)
      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:616)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:297)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:160)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:95)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:684)
      ... 64 more

        Attachments

          Activity

          Hide
          eguess74 eguess74 added a comment - - edited

          i have an an NPE as well failing on the manual build with parameter GERRIT_REFSPEC set. It fails on the git rev-parse FETCH_HEAD^

          {commit}

          It might be necessary to pull this into another bug though...

          Show
          eguess74 eguess74 added a comment - - edited i have an an NPE as well failing on the manual build with parameter GERRIT_REFSPEC set. It fails on the git rev-parse FETCH_HEAD^ {commit} It might be necessary to pull this into another bug though...
          Hide
          rin_ne rin_ne added a comment - - edited

          When you ran build, session for search query might have been already closed.

          I will create new PR to check session status.

          @eguess74, did you set "Gerrit Trigger" to choosing strategy in git plugin?

          Show
          rin_ne rin_ne added a comment - - edited When you ran build, session for search query might have been already closed. I will create new PR to check session status. @eguess74, did you set "Gerrit Trigger" to choosing strategy in git plugin?
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: rinrinne
          Path:
          src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/actions/manual/ManualTriggerAction.java
          src/main/resources/com/sonyericsson/hudson/plugins/gerrit/trigger/Messages.properties
          src/main/resources/com/sonyericsson/hudson/plugins/gerrit/trigger/Messages_ja.properties
          http://jenkins-ci.org/commit/gerrit-trigger-plugin/02c4d4febc31582d2d39c5955d3ae4dd40d8c01b
          Log:
          Fix session management in manual trigger page

          In ManualTriggerAction, session is always created if nothing.
          It might be issue if session is closed before build.

          This patch creates session once then reuse it.

          Fix for JENKINS-19013

          Task-Url: https://issues.jenkins-ci.org/browse/JENKINS-19013

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rinrinne Path: src/main/java/com/sonyericsson/hudson/plugins/gerrit/trigger/hudsontrigger/actions/manual/ManualTriggerAction.java src/main/resources/com/sonyericsson/hudson/plugins/gerrit/trigger/Messages.properties src/main/resources/com/sonyericsson/hudson/plugins/gerrit/trigger/Messages_ja.properties http://jenkins-ci.org/commit/gerrit-trigger-plugin/02c4d4febc31582d2d39c5955d3ae4dd40d8c01b Log: Fix session management in manual trigger page In ManualTriggerAction, session is always created if nothing. It might be issue if session is closed before build. This patch creates session once then reuse it. Fix for JENKINS-19013 Task-Url: https://issues.jenkins-ci.org/browse/JENKINS-19013
          Hide
          eguess74 eguess74 added a comment - - edited

          @rin_ne - yes, that fixed the issue for me, thank you. Sorry for the noise.
          OTOH i see this mistake quite often in web, so may be it would make sense to make it default selection?

          Show
          eguess74 eguess74 added a comment - - edited @rin_ne - yes, that fixed the issue for me, thank you. Sorry for the noise. OTOH i see this mistake quite often in web, so may be it would make sense to make it default selection?
          Hide
          rin_ne rin_ne added a comment -

          Seems this plugin simply implements interface provided by git plugin.
          It does not have such feature.

          If you want, you should request to git plugin at first.

          Show
          rin_ne rin_ne added a comment - Seems this plugin simply implements interface provided by git plugin. It does not have such feature. If you want, you should request to git plugin at first.

            People

            • Assignee:
              rsandell rsandell
              Reporter:
              chr0n1x Kevin R.
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: