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

HistoryWidget/entry.jelly throws NullPointerException

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core

      I have a job with 100 builds in the history. Builds 69 through 100 are listed in the job page. When I click "more..." to see jobs 68 and older I get the following exception:

      Status Code: 500
      Exception: org.apache.commons.jelly.JellyTagException: jar:file:/C:/Users/Gili/.jenkins/war/WEB-INF/lib/jenkins-core-1.485.jar!/hudson/widgets/HistoryWidget/entry.jelly:39:106: <i:formatDate> java.lang.NullPointerException
      Stacktrace:
      
      javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:/C:/Users/Gili/.jenkins/war/WEB-INF/lib/jenkins-core-1.485.jar!/hudson/widgets/HistoryWidget/entry.jelly:39:106: <i:formatDate> java.lang.NullPointerException
      	at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:103)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
      	at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:384)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
      	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:488)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:162)
      	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:95)
      	at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:66)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      	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.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:50)
      	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:215)
      	at winstone.RequestHandlerThread.run(RequestHandlerThread.java:138)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.apache.commons.jelly.JellyTagException: jar:file:/C:/Users/Gili/.jenkins/war/WEB-INF/lib/jenkins-core-1.485.jar!/hudson/widgets/HistoryWidget/entry.jelly:39:106: <i:formatDate> java.lang.NullPointerException
      	at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:726)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:281)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
      	at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:146)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
      	at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
      	at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:146)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
      	at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:146)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
      	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
      	at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:146)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
      	at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
      	at org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:41)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
      	at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      	at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
      	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
      	at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
      	at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
      	at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:95)
      	... 45 more
      Caused by: java.lang.NullPointerException
      	at java.util.Calendar.setTime(Unknown Source)
      	at java.text.SimpleDateFormat.format(Unknown Source)
      	at java.text.SimpleDateFormat.format(Unknown Source)
      	at java.text.DateFormat.format(Unknown Source)
      	at org.apache.commons.jelly.tags.fmt.FormatDateTag.doTag(FormatDateTag.java:182)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	... 100 more
      

          [JENKINS-15499] HistoryWidget/entry.jelly throws NullPointerException

          S Daigle added a comment - - edited

          Is there any update on this?

          We also use the API and now all the jobs we have that try accessing the complete build history are failing:

          wget --no-check-certificate --auth-no-challenge https://jenkins/ci/job/MYBUILD/buildHistory/all
          -2012-11-08 07:24:07- https://jenkins/ci/job/MYBUILD/all
          Resolving jenkins... 127.0.1.1, 10.0.0.70
          Connecting to jenkins|127.0.1.1|:443... connected.
          HTTP request sent, awaiting response... 500 Internal Server Error
          2012-11-08 07:24:07 ERROR 500: Internal Server Error.

          If I do not specify the "/all" attribute, it returns successfully.

          We are running the latest 1.489 version as well.

          S Daigle added a comment - - edited Is there any update on this? We also use the API and now all the jobs we have that try accessing the complete build history are failing: wget --no-check-certificate --auth-no-challenge https://jenkins/ci/job/MYBUILD/buildHistory/all - 2012-11-08 07:24:07 - https://jenkins/ci/job/MYBUILD/all Resolving jenkins... 127.0.1.1, 10.0.0.70 Connecting to jenkins|127.0.1.1|:443... connected. HTTP request sent, awaiting response... 500 Internal Server Error 2012-11-08 07:24:07 ERROR 500: Internal Server Error. If I do not specify the "/all" attribute, it returns successfully. We are running the latest 1.489 version as well.

          Jenkins ver. 1.489 has the same bug.
          Any workaround?

          Sergey Smirnov added a comment - Jenkins ver. 1.489 has the same bug. Any workaround?

          S Daigle added a comment -

          The only way I could get this to work was to roll back to version 1.484

          S Daigle added a comment - The only way I could get this to work was to roll back to version 1.484

          Tamas Papp added a comment -

          When I tried to do that, I got various errors.
          Should it work fine?

          Tamas Papp added a comment - When I tried to do that, I got various errors. Should it work fine?

          S Daigle added a comment -

          Mine rolled back without any issues. I diffed the client slave.jar files between 1.484 and 1.489 and they were identical so all I had to do was install the 1.484 jenkins war on the server. Our server is on Ubuntu so all I did was shutdown jenkins, remove the old exploded war/cache, copy the 1.484 war in place and restarted jenkins. Everything came back fine and the "more" links were working again and my API build history scripts worked again.

          S Daigle added a comment - Mine rolled back without any issues. I diffed the client slave.jar files between 1.484 and 1.489 and they were identical so all I had to do was install the 1.484 jenkins war on the server. Our server is on Ubuntu so all I did was shutdown jenkins, remove the old exploded war/cache, copy the 1.484 war in place and restarted jenkins. Everything came back fine and the "more" links were working again and my API build history scripts worked again.

          Thomas Oeding added a comment -

          Prio should be Critical, breaks a lot of reporting scripts.

          Thomas Oeding added a comment - Prio should be Critical, breaks a lot of reporting scripts.

          Fix proposed in pull request

          https://github.com/jenkinsci/jenkins/pull/621

          Richard Mortimer added a comment - Fix proposed in pull request https://github.com/jenkinsci/jenkins/pull/621

          Code changed in jenkins
          User: Richard Mortimer
          Path:
          changelog.html
          core/src/main/java/hudson/widgets/HistoryWidget.java
          http://jenkins-ci.org/commit/jenkins/e429b6979b5d736bbbb1168a743c9e32801e2a9b
          Log:
          [FIXED JENKINS-15499] HistoryWidget/entry.jelly throws NullPointerException

          Wrap history iterable to hide class implementation details.
          Jelly was getting confused by the history underlying class being implemented
          as an extension of Map

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Richard Mortimer Path: changelog.html core/src/main/java/hudson/widgets/HistoryWidget.java http://jenkins-ci.org/commit/jenkins/e429b6979b5d736bbbb1168a743c9e32801e2a9b Log: [FIXED JENKINS-15499] HistoryWidget/entry.jelly throws NullPointerException Wrap history iterable to hide class implementation details. Jelly was getting confused by the history underlying class being implemented as an extension of Map

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2084
          [FIXED JENKINS-15499] HistoryWidget/entry.jelly throws NullPointerException (Revision e429b6979b5d736bbbb1168a743c9e32801e2a9b)

          Result = SUCCESS
          kohsuke : e429b6979b5d736bbbb1168a743c9e32801e2a9b
          Files :

          • changelog.html
          • core/src/main/java/hudson/widgets/HistoryWidget.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2084 [FIXED JENKINS-15499] HistoryWidget/entry.jelly throws NullPointerException (Revision e429b6979b5d736bbbb1168a743c9e32801e2a9b) Result = SUCCESS kohsuke : e429b6979b5d736bbbb1168a743c9e32801e2a9b Files : changelog.html core/src/main/java/hudson/widgets/HistoryWidget.java

          S Daigle added a comment -

          Upgraded to latest Jenkins ver. 1.492 today and the "More" link to additional builds is fixed as well as the "buildHistory/all" API. Thanks!

          S Daigle added a comment - Upgraded to latest Jenkins ver. 1.492 today and the "More" link to additional builds is fixed as well as the "buildHistory/all" API. Thanks!

            oldelvet Richard Mortimer
            cowwoc cowwoc
            Votes:
            37 Vote for this issue
            Watchers:
            48 Start watching this issue

              Created:
              Updated:
              Resolved: