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

NullPointerException when running groovy CLI without setting the offline cause

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • mail-watcher-plugin
    • Version: 1.12
      Linux: centos
      Chrome:
      I've already tested twice:
      - Production environment based on the above configuration
      - Locally (mvn hpi:run)

      Stacktrace:

      java.lang.NullPointerException
      	at org.jenkinsci.plugins.mailwatcher.WatcherComputerListener.onTemporarilyOffline(WatcherComputerListener.java:110)
      	at hudson.model.Computer.setTemporarilyOffline(Computer.java:608)
      	at hudson.model.Computer.setTemporarilyOffline(Computer.java:585)
      	at hudson.model.Computer$setTemporarilyOffline.call(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
      	at Script1$_run_closure1.doCall(Script1.groovy:3)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
      	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:903)
      	at groovy.lang.Closure.call(Closure.java:415)
      	at groovy.lang.Closure.call(Closure.java:428)
      	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1379)
      	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1351)
      	at org.codehaus.groovy.runtime.dgm$170.invoke(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
      	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe(AbstractCallSite.java:82)
      	at Script1.run(Script1.groovy:1)
      	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580)
      	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:618)
      	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
      	at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:139)
      	at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:111)
      	at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
      	at hudson.util.RemotingDiagnostics.executeGroovy(RemotingDiagnostics.java:108)
      	at jenkins.model.Jenkins._doScript(Jenkins.java:3556)
      	at jenkins.model.Jenkins.doScript(Jenkins.java:3533)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	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.Stapler.invoke(Stapler.java:649)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:123)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:114)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
      	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 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
      	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
      	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
      	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
      	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
      	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
      	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      	at org.mortbay.jetty.Server.handle(Server.java:285)
      	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
      	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
      	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:628)
      	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
      	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
      	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
      	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
      

      How to reproduce:

            olivergondza Oliver Gondža
            v2v Victor Martinez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: