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

HTML Publisher Plugin "Add" button broken after 1.474 upgrade

      Jenkins version 1.474
      HTML Publisher 1.0

      Steps to reproduce:
      Create a new job
      Configure the job, add a post-build action, click "Add"
      Nothing happens, no report is added.

      In already existing job that has an existing HTML Publisher, the "Add" button works.

      This is NOT broken in Jenkins 1.473.

      I use Firefox 14.0.1 (linux and windows), and IE 7.

      For me this is a blocker, because I have no workaround.

          [JENKINS-14491] HTML Publisher Plugin "Add" button broken after 1.474 upgrade

          Reverting to Jenkins 1.473 while keeping the plugin to 1.0 works.

          Martin d'Anjou added a comment - Reverting to Jenkins 1.473 while keeping the plugin to 1.0 works.

          mcrooney added a comment -

          Thanks for the report! As I understand Jenkins philosophy, this is a core bug, as a Jenkins upgrade shouldn't break existing plugins. Reverting to 1.473 seems good for now, please raise this in #jenkins IRC if you can and see what kohsuke/anyone says, and let me know.

          mcrooney added a comment - Thanks for the report! As I understand Jenkins philosophy, this is a core bug, as a Jenkins upgrade shouldn't break existing plugins. Reverting to 1.473 seems good for now, please raise this in #jenkins IRC if you can and see what kohsuke/anyone says, and let me know.

          Is there any update if this is a core problem or if it needs fixing in the plugin?
          I use Jenkins from the Linux package management and I can't simply install an older version like 1.473

          P.S.
          If there's a way to fix this in the plugin itself, should it not be done in any case?

          Lothar Werzinger added a comment - Is there any update if this is a core problem or if it needs fixing in the plugin? I use Jenkins from the Linux package management and I can't simply install an older version like 1.473 P.S. If there's a way to fix this in the plugin itself, should it not be done in any case?

          mcrooney added a comment -

          It seems no one raised this in #jenkins, so I will try to get a response.

          Lothar, for multiple reasons, including the issue you just encountered, I wouldn't recommend adding the Jenkins apt/yum/etc repository for a production server. The ability to roll back is crucial in the case of a Jenkins version which breaks some feature you rely on or has other bugs; you don't want this out of your control. Plus, surprise upgrades or new server spinups getting different versions is often problematic. I'd recommend either having your own repo where you can control the version, or simply use the specific version of the deb/rpm you need. See for example the second example at https://wiki.jenkins-ci.org/display/JENKINS/Puppet.

          Can anyone experiencing this bug let me know if there are any Javascript errors in the browser console when this issue occurs? That will help me track it down. Thanks!

          mcrooney added a comment - It seems no one raised this in #jenkins, so I will try to get a response. Lothar, for multiple reasons, including the issue you just encountered, I wouldn't recommend adding the Jenkins apt/yum/etc repository for a production server. The ability to roll back is crucial in the case of a Jenkins version which breaks some feature you rely on or has other bugs; you don't want this out of your control. Plus, surprise upgrades or new server spinups getting different versions is often problematic. I'd recommend either having your own repo where you can control the version, or simply use the specific version of the deb/rpm you need. See for example the second example at https://wiki.jenkins-ci.org/display/JENKINS/Puppet . Can anyone experiencing this bug let me know if there are any Javascript errors in the browser console when this issue occurs? That will help me track it down. Thanks!

          Brian Tyler added a comment - - edited

          I checked in Chrome and there were no JS errors. I even stepped through the code, but there was nothing obvious.

          FYI however you installed Jenkins all you need to do is download the Jenkins WAR file and drop that into your install directory (http://mirrors.jenkins-ci.org/war/1.473/) + restart.

          Brian Tyler added a comment - - edited I checked in Chrome and there were no JS errors. I even stepped through the code, but there was nothing obvious. FYI however you installed Jenkins all you need to do is download the Jenkins WAR file and drop that into your install directory ( http://mirrors.jenkins-ci.org/war/1.473/ ) + restart.

          Jesse Jacob added a comment -

          Same issue for me: when I click add nothing happens and no script errors on FF12 and IE9, but when I click save I get a 500 and the following stack trace:
          Status Code: 500
          Exception: java.lang.RuntimeException: Failed to instantiate class htmlpublisher.HtmlPublisher from

          {"kind":"htmlpublisher.HtmlPublisher","stapler-class":"htmlpublisher.HtmlPublisher"}

          Stacktrace:
          javax.servlet.ServletException: java.lang.RuntimeException: Failed to instantiate class htmlpublisher.HtmlPublisher from

          {"kind":"htmlpublisher.HtmlPublisher","stapler-class":"htmlpublisher.HtmlPublisher"}

          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:616)
          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.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
          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$Worker.runTask(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
          Caused by: java.lang.RuntimeException: Failed to instantiate class htmlpublisher.HtmlPublisher from

          {"kind":"htmlpublisher.HtmlPublisher","stapler-class":"htmlpublisher.HtmlPublisher"}

          at hudson.model.Descriptor.newInstance(Descriptor.java:575)
          at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:912)
          at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:899)
          at hudson.util.DescribableList.rebuildHetero(DescribableList.java:203)
          at hudson.model.Project.submit(Project.java:203)
          at hudson.model.Job.doConfigSubmit(Job.java:990)
          at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:688)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
          at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
          at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
          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:574)
          ... 41 more
          Caused by: java.lang.NullPointerException
          at java.util.ArrayList.<init>(Unknown Source)
          at htmlpublisher.HtmlPublisher.<init>(HtmlPublisher.java:60)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
          at java.lang.reflect.Constructor.newInstance(Unknown Source)
          at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:424)
          at org.kohsuke.stapler.RequestImpl.access$300(RequestImpl.java:76)
          at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:631)
          at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:377)
          at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:373)
          at hudson.model.Descriptor.newInstance(Descriptor.java:566)
          ... 57 more


          Rolling back to 1.473 via WAR swap cured it.

          Jesse Jacob added a comment - Same issue for me: when I click add nothing happens and no script errors on FF12 and IE9, but when I click save I get a 500 and the following stack trace: Status Code: 500 Exception: java.lang.RuntimeException: Failed to instantiate class htmlpublisher.HtmlPublisher from {"kind":"htmlpublisher.HtmlPublisher","stapler-class":"htmlpublisher.HtmlPublisher"} Stacktrace: javax.servlet.ServletException: java.lang.RuntimeException: Failed to instantiate class htmlpublisher.HtmlPublisher from {"kind":"htmlpublisher.HtmlPublisher","stapler-class":"htmlpublisher.HtmlPublisher"} at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:616) 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.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58) 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$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.RuntimeException: Failed to instantiate class htmlpublisher.HtmlPublisher from {"kind":"htmlpublisher.HtmlPublisher","stapler-class":"htmlpublisher.HtmlPublisher"} at hudson.model.Descriptor.newInstance(Descriptor.java:575) at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:912) at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:899) at hudson.util.DescribableList.rebuildHetero(DescribableList.java:203) at hudson.model.Project.submit(Project.java:203) at hudson.model.Job.doConfigSubmit(Job.java:990) at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:688) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90) 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:574) ... 41 more Caused by: java.lang.NullPointerException at java.util.ArrayList.<init>(Unknown Source) at htmlpublisher.HtmlPublisher.<init>(HtmlPublisher.java:60) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:424) at org.kohsuke.stapler.RequestImpl.access$300(RequestImpl.java:76) at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:631) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:377) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:373) at hudson.model.Descriptor.newInstance(Descriptor.java:566) ... 57 more Rolling back to 1.473 via WAR swap cured it.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/htmlpublisher/HtmlPublisher.java
          http://jenkins-ci.org/commit/htmlpublisher-plugin/d3d24157587d9e25fb634280b1787bbbf61bb38c
          Log:
          JENKINS-14491 NPE reported by Jesse Jacob.
          Form binding apparently neglects to pass empty lists to data-bound constructors, so check for null.
          Reproducible even in 1.473 just by configuring publisher with no rows,
          i.e. not actually the real problem reported in this bug (though made more apparent by it).

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/htmlpublisher/HtmlPublisher.java http://jenkins-ci.org/commit/htmlpublisher-plugin/d3d24157587d9e25fb634280b1787bbbf61bb38c Log: JENKINS-14491 NPE reported by Jesse Jacob. Form binding apparently neglects to pass empty lists to data-bound constructors, so check for null. Reproducible even in 1.473 just by configuring publisher with no rows, i.e. not actually the real problem reported in this bug (though made more apparent by it).

          Jenkins 1.477 no longer has the problem. Thank you.

          Martin d'Anjou added a comment - Jenkins 1.477 no longer has the problem. Thank you.

            mcrooney mcrooney
            deepchip Martin d'Anjou
            Votes:
            6 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: