• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • build-publisher-plugin
    • None
    • Linux 64

      If build-publishing fails, and you click 'See the server response HTML' you get the error code 500.

      Status Code: 500
      Exception: java.lang.NullPointerException
      Stacktrace:

      javax.servlet.ServletException: java.lang.NullPointerException
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:616)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659)
      at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:203)
      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.MetaClass$4.doDispatch(MetaClass.java:203)
      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.MetaClass$7.doDispatch(MetaClass.java:260)
      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.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 net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:202)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:175)
      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: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.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      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:173)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:63)
      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:66)
      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: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(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 java.io.PrintWriter.write(PrintWriter.java:446)
      at hudson.plugins.build_publisher.ThreadState$ErrorRecoveryWait.doOutput(ThreadState.java:88)
      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: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)
      ... 75 more

          [JENKINS-14987] server response HTML - Error 500

          Joel Wheeler added a comment -

          I see this same error and same stacktrace when attempting to access the api/xml or api/json url, for several different jobs that I am running (http://<hostname>/job/<jobname>/api/[xml|json]).

          A bunch of garbage text also appears at the top of the requested xml page. For instance, for a job 'wipmast', it prints out:

          wipmastwipmasthttp://etcbuild5.btv.ibm.com:8080/job/wipmast/true16http://etcbuild5.btv.ibm.com:8080/job/wipmast/16/15http://etcbuild5.btv.ibm.com:8080/job/wipmast/15/14http://etcbuild5.btv.ibm.com:8080/job/wipmast/14/13http://etcbuild5.btv.ibm.com:8080/job/wipmast/13/12http://etcbuild5.btv.ibm.com:8080/job/wipmast/12/

          at the top of the page, before the Status Code: 500 + stacktrace.

          Same thing occurs when requesting the json api:

          {"actions":[{},{},{},{},{}],"description":"","displayName":"wipmast","displayNameOrNull":null,"name":"wipmast","url":"http://etcbuild5.btv.ibm.com:8080/job/wipmast/","buildable":true,"builds":[

          {"number":16,"url":"http://etcbuild5.btv.ibm.com:8080/job/wipmast/16/"}

          ,

          {"number":15,"url":"http://etcbuild5.btv.ibm.com:8080/job/wipmast/15/"}

          ,

          {"number":14,"url":"http://etcbuild5.btv.ibm.com:8080/job/wipmast/14/"}

          ,

          {"number":13,"url":"http://etcbuild5.btv.ibm.com:8080/job/wipmast/13/"}

          ,

          {"number":12,"url":"http://etcbuild5.btv.ibm.com:8080/job/wipmast/12/"}

          This is followed by the 500 error and stacktrace indicated in this initial bug posting.

          If I go back and manually do a 'build now' on the job, the error message goes away. I've only seen the 500 error show up on jobs which are triggered by an SCM change. A manual 'build now' seems to correct the problem. But the appearance of the bug has been limited, so this may be purely coincidental.

          I am running jenkins 1.485.

          Joel Wheeler added a comment - I see this same error and same stacktrace when attempting to access the api/xml or api/json url, for several different jobs that I am running (http://<hostname>/job/<jobname>/api/ [xml|json] ). A bunch of garbage text also appears at the top of the requested xml page. For instance, for a job 'wipmast', it prints out: wipmastwipmasthttp://etcbuild5.btv.ibm.com:8080/job/wipmast/true16http://etcbuild5.btv.ibm.com:8080/job/wipmast/16/15http://etcbuild5.btv.ibm.com:8080/job/wipmast/15/14http://etcbuild5.btv.ibm.com:8080/job/wipmast/14/13http://etcbuild5.btv.ibm.com:8080/job/wipmast/13/12http://etcbuild5.btv.ibm.com:8080/job/wipmast/12/ at the top of the page, before the Status Code: 500 + stacktrace. Same thing occurs when requesting the json api: {"actions": [{},{},{},{},{}] ,"description":"","displayName":"wipmast","displayNameOrNull":null,"name":"wipmast","url":"http://etcbuild5.btv.ibm.com:8080/job/wipmast/","buildable":true,"builds":[ {"number":16,"url":"http://etcbuild5.btv.ibm.com:8080/job/wipmast/16/"} , {"number":15,"url":"http://etcbuild5.btv.ibm.com:8080/job/wipmast/15/"} , {"number":14,"url":"http://etcbuild5.btv.ibm.com:8080/job/wipmast/14/"} , {"number":13,"url":"http://etcbuild5.btv.ibm.com:8080/job/wipmast/13/"} , {"number":12,"url":"http://etcbuild5.btv.ibm.com:8080/job/wipmast/12/"} This is followed by the 500 error and stacktrace indicated in this initial bug posting. If I go back and manually do a 'build now' on the job, the error message goes away. I've only seen the 500 error show up on jobs which are triggered by an SCM change. A manual 'build now' seems to correct the problem. But the appearance of the bug has been limited, so this may be purely coincidental. I am running jenkins 1.485.

          Joel Wheeler added a comment -

          In my last comment I realized that I posted some "good" json output, and not the garbled json output. Sorry about that.

          The issue has occurred numerous times, and it always appears to be when the build is ultimately triggered by other builds which are automatically rebuilt due to a code change in CVS. Manually executing the build corrects the api problem.

          Joel Wheeler added a comment - In my last comment I realized that I posted some "good" json output, and not the garbled json output. Sorry about that. The issue has occurred numerous times, and it always appears to be when the build is ultimately triggered by other builds which are automatically rebuilt due to a code change in CVS. Manually executing the build corrects the api problem.

            vjuranek vjuranek
            stefan_rohleder Stefan Rohleder
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: