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

LTS 1.596.1 REST api <job>/api/json?depth=1 produces ERROR 500, Oops page

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • None
    • LTS 1.596.1
      Git Plugin 2.2.10

      Upgrade to LTS 1.596.1. Same call works on prior version (1.565.3).

      Some data is returned, then oops page. Original exception:

       Caused by: java.lang.NullPointerException
      at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1439)
      at java.text.DateFormat.parse(DateFormat.java:364)
      at hudson.plugins.git.GitChangeSet.getTimestamp(GitChangeSet.java:195)

      depth=0 is fine, 1, 2 fail:

      Stack trace

      java.io.IOException: Failed to write timestamp
      	at org.kohsuke.stapler.export.Property.writeTo(Property.java:122)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:197)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:192)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:241)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:172)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:139)
      	at org.kohsuke.stapler.export.Property.writeTo(Property.java:116)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:197)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:192)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:241)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:139)
      	at org.kohsuke.stapler.export.Property.writeTo(Property.java:116)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:197)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:192)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:192)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:241)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:187)
      	at org.kohsuke.stapler.export.Property.writeValue(Property.java:139)
      	at org.kohsuke.stapler.export.Property.writeTo(Property.java:116)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:197)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:192)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:192)
      	at org.kohsuke.stapler.export.Model.writeNestedObjectTo(Model.java:192)
      	at org.kohsuke.stapler.export.Model.writeTo(Model.java:164)
      	at org.kohsuke.stapler.ResponseImpl.serveExposedBean(ResponseImpl.java:267)
      	at hudson.model.Api.doJson(Api.java:211)
      	at sun.reflect.GeneratedMethodAccessor546.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:211)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
      	at com.cloudbees.jenkins.support.slowrequest.SlowRequestFilter.doFilter(SlowRequestFilter.java:37)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
      	at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:117)
      	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.util.PluginServletFilter.doFilter(PluginServletFilter.java:102)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:91)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	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:117)
      	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 hudson.security.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:114)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      ...

        1. builds.tar
          5.98 MB
        2. config.xml
          15 kB
        3. support.zip
          450 kB
        4. support(1).zip
          384 kB

          [JENKINS-27447] LTS 1.596.1 REST api <job>/api/json?depth=1 produces ERROR 500, Oops page

          Daniel Beck added a comment -

          Yes, truncated but nothing at the end. I'll post it below.

          You mean besides the actual problem, Git plugin trying to parse a date/time value from recorded changelog data?

          Daniel Beck added a comment - Yes, truncated but nothing at the end. I'll post it below. You mean besides the actual problem, Git plugin trying to parse a date/time value from recorded changelog data?

          Daryl Spartz added a comment -

          yes, saw it last night. The original stack trace did not have that. Apparently, Java stacktrace can be limited (log4j?). The Jenkins web page also didn't show it. After I eliminated enough of the plugins, where was space available for the useful stuff. Thanks!

          Daryl Spartz added a comment - yes, saw it last night. The original stack trace did not have that. Apparently, Java stacktrace can be limited (log4j?). The Jenkins web page also didn't show it. After I eliminated enough of the plugins, where was space available for the useful stuff. Thanks!

          Daryl Spartz added a comment -

          Error in git-plugin, will pursue there, if not fixed in latest

          Daryl Spartz added a comment - Error in git-plugin, will pursue there, if not fixed in latest

          Daniel Beck added a comment -

          Let's move this over to Git plugin. You can always resolve as Not A Defect or Cannot Reproduce if the newest version doesn't have this problem.

          Daniel Beck added a comment - Let's move this over to Git plugin. You can always resolve as Not A Defect or Cannot Reproduce if the newest version doesn't have this problem.

          Mark Waite added a comment -

          With the upgrade from 1.566.3 to 1.596.1, you should also be able to update the git plugin from the 2.2.x series to the 2.3.x series. The current unreleased git plugin version (will eventually be 2.3.6) includes changes for null pointer avoidance in that specific area, thanks to the work of ndeloof.

          If you're interested in "test driving" a pre-release to see if it also resolves your problem, you can either build your own copy, or I can build a copy and upload it for you.

          Mark Waite added a comment - With the upgrade from 1.566.3 to 1.596.1, you should also be able to update the git plugin from the 2.2.x series to the 2.3.x series. The current unreleased git plugin version (will eventually be 2.3.6) includes changes for null pointer avoidance in that specific area, thanks to the work of ndeloof . If you're interested in "test driving" a pre-release to see if it also resolves your problem, you can either build your own copy, or I can build a copy and upload it for you.

          Daryl Spartz added a comment -

          I built 2.3.6-snapshot (from master branch) and installed on our test system. The "oops" page still occurs:
          ...
          Caused by: java.lang.NullPointerException
          at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1439)
          at java.text.DateFormat.parse(DateFormat.java:364)
          at hudson.plugins.git.GitChangeSet.getTimestamp(GitChangeSet.java:209)

          Daryl Spartz added a comment - I built 2.3.6-snapshot (from master branch) and installed on our test system. The "oops" page still occurs: ... Caused by: java.lang.NullPointerException at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1439) at java.text.DateFormat.parse(DateFormat.java:364) at hudson.plugins.git.GitChangeSet.getTimestamp(GitChangeSet.java:209)

          Mark Waite added a comment -

          That's quite surprising. Since the null pointer exception is two layers inside the Java source code, it would be a great help for diagnosis if you could catch that null pointer exception and display the date string that was being parsed when the null pointer exception happened.

          Mark Waite added a comment - That's quite surprising. Since the null pointer exception is two layers inside the Java source code, it would be a great help for diagnosis if you could catch that null pointer exception and display the date string that was being parsed when the null pointer exception happened.

          Daryl Spartz added a comment -

          I've attached what needs to used to recreate, don't know if you have tried. I'm digging into another issue at the moment.

          Daryl Spartz added a comment - I've attached what needs to used to recreate, don't know if you have tried. I'm digging into another issue at the moment.

          Daryl Spartz added a comment -

          Debugging the plugin, I discovered the root cause and resolved the issue, based on this and upgrading the plugins: https://issues.jenkins-ci.org/browse/JENKINS-20070

          Daryl Spartz added a comment - Debugging the plugin, I discovered the root cause and resolved the issue, based on this and upgrading the plugins: https://issues.jenkins-ci.org/browse/JENKINS-20070

          Daryl Spartz added a comment -

          Upgraded plugins based on this Jira: https://issues.jenkins-ci.org/browse/JENKINS-20070

          Daryl Spartz added a comment - Upgraded plugins based on this Jira: https://issues.jenkins-ci.org/browse/JENKINS-20070

            ndeloof Nicolas De Loof
            dspartz Daryl Spartz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: