java.lang.NullPointerException: Cannot invoke method getBuildByNumber() on <span class="code-keyword" style="color: #000091">null</span> object

Google Groups | svan...@cloudbees.com (JIRA) | 11 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    [JIRA] [pipeline-stage-view-plugin] (JENKINS-34644) Stage View Shows Excessively Long Full Run Time Figures

    Google Groups | 11 months ago | svan...@cloudbees.com (JIRA)
    java.lang.NullPointerException: Cannot invoke method getBuildByNumber() on <span class="code-keyword" style="color: #000091">null</span> object
  2. 0

    How do you configure the Jenkins "Create Job Advanced" plugin via groovy?

    Stack Overflow | 1 year ago | user3358549
    java.lang.NullPointerException: Cannot invoke method configure() on null object
  3. 0

    Jenkins Active Choices Plugin, Dynamically populate dropdown with Properties file

    Stack Overflow | 1 year ago | Codemiester
    java.lang.NullPointerException: Cannot invoke method split() on null object
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ERROR: Processing failed due to a bug in the code.

    Google Groups | 4 years ago | Ahmet Maruf Aytekin
    java.lang.NullPointerException: Cannot invoke method getModuleRecords() on null object
  6. 0

    We use the Groovy-Postbuild-Plugin to set successful Upstream-Builds to failed, when a downstream-Build failes. The upstream-Build saves several Artefacts and creates Fingerprints from these. Some times the Groovy-Postbuild-Plugin works with the code below for ten or more builds, afterwards we get the below mentioned NullPointerException several times without changing anything in the configuration. ________________________________________________________ Groovy-Code: upstreamBuilds = manager.build.getUpstreamBuilds(); upstreamJob = upstreamBuilds.keySet().iterator().next(); lastUpstreamBuild = upstreamJob.getLastBuild(); if(lastUpstreamBuild.getResult().isBetterThan(manager.build.result)) { lastUpstreamBuild.setResult(manager.build.result); } ________________________________________________________ Exception: Groovy script failed: java.lang.NullPointerException: Cannot invoke method isBetterThan() on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32) 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(Script1.groovy:23) 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 org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder.perform(GroovyPostbuildRecorder.java:273) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:692) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639) at hudson.model.Run.execute(Run.java:1485) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:239)

    Jenkins JIRA | 5 years ago | Christoph Moser
    java.lang.NullPointerException: Cannot invoke method isBetterThan() on null object
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    Cannot invoke method getBuildByNumber() on <span class="code-keyword" style="color: #000091">null</span> object

    at org.codehaus.groovy.runtime.NullObject.invokeMethod()
  2. Groovy
    AbstractCallSite.call
    1. org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
    2. org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
    3. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    4. org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:35)
    5. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    6. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
    7. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
    7 frames
  3. Unknown
    Script1.run
    1. Script1.run(Script1.groovy:1)
    1 frame
  4. Groovy
    GroovyShell.evaluate
    1. groovy.lang.GroovyShell.evaluate(GroovyShell.java:585)
    2. groovy.lang.GroovyShell.evaluate(GroovyShell.java:623)
    3. groovy.lang.GroovyShell.evaluate(GroovyShell.java:594)
    3 frames
  5. Hudson
    RemotingDiagnostics$Script.call
    1. hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:142)
    2. hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:114)
    2 frames
  6. Hudson :: Remoting Layer
    LocalChannel.call
    1. hudson.remoting.LocalChannel.call(LocalChannel.java:45)
    1 frame
  7. Hudson
    RemotingDiagnostics.executeGroovy
    1. hudson.util.RemotingDiagnostics.executeGroovy(RemotingDiagnostics.java:111)
    1 frame
  8. jenkins.model
    Jenkins.doScript
    1. jenkins.model.Jenkins._doScript(Jenkins.java:4043)
    2. jenkins.model.Jenkins.doScript(Jenkins.java:4015)
    2 frames
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  10. Stapler
    Stapler.service
    1. org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
    2. org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
    3. org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
    4. org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
    5. org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
    6. org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
    7. org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
    8. org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
    9. org.kohsuke.stapler.Stapler.service(Stapler.java:238)
    9 frames
  11. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    1 frame
  12. Jetty
    ServletHandler$CachedChain.doFilter
    1. org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
    2. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
    2 frames
  13. Hudson
    PluginServletFilter$1.doFilter
    1. hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
    1 frame
  14. hudson.plugins.scm_sync_configuration
    ScmSyncConfigurationFilter.doFilter
    1. hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationFilter$1.call(ScmSyncConfigurationFilter.java:49)
    2. hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationFilter$1.call(ScmSyncConfigurationFilter.java:44)
    3. hudson.plugins.scm_sync_configuration.ScmSyncConfigurationDataProvider.provideRequestDuring(ScmSyncConfigurationDataProvider.java:106)
    4. hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationFilter.doFilter(ScmSyncConfigurationFilter.java:44)
    4 frames
  15. Hudson
    PluginServletFilter.doFilter
    1. hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
    2. hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
    2 frames
  16. Jetty
    ServletHandler$CachedChain.doFilter
    1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    1 frame
  17. Hudson
    CrumbFilter.doFilter
    1. hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
    1 frame
  18. Jetty
    ServletHandler$CachedChain.doFilter
    1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    1 frame
  19. Hudson
    ChainedServletFilter$1.doFilter
    1. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    2. hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
    3. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    3 frames
  20. jenkins.security
    ExceptionTranslationFilter.doFilter
    1. jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
    1 frame
  21. Hudson
    ChainedServletFilter$1.doFilter
    1. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    1 frame
  22. Acegi Security Core
    AnonymousProcessingFilter.doFilter
    1. org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
    1 frame
  23. Hudson
    ChainedServletFilter$1.doFilter
    1. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    1 frame
  24. Acegi Security Core
    RememberMeProcessingFilter.doFilter
    1. org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
    1 frame
  25. Hudson
    ChainedServletFilter$1.doFilter
    1. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    1 frame
  26. Acegi Security Core
    AbstractProcessingFilter.doFilter
    1. org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
    1 frame
  27. Hudson
    ChainedServletFilter$1.doFilter
    1. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    1 frame
  28. jenkins.security
    BasicHeaderProcessor.doFilter
    1. jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
    1 frame
  29. Hudson
    ChainedServletFilter$1.doFilter
    1. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    1 frame
  30. Acegi Security Core
    HttpSessionContextIntegrationFilter.doFilter
    1. org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
    1 frame
  31. Hudson
    HudsonFilter.doFilter
    1. hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
    2. hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    3. hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    4. hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
    4 frames
  32. Jetty
    ServletHandler$CachedChain.doFilter
    1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    1 frame
  33. Stapler
    CompressionFilter.doFilter
    1. org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
    1 frame
  34. Jetty
    ServletHandler$CachedChain.doFilter
    1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    1 frame
  35. Hudson
    CharacterEncodingFilter.doFilter
    1. hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
    1 frame
  36. Jetty
    ServletHandler$CachedChain.doFilter
    1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    1 frame
  37. Stapler
    DiagnosticThreadNameFilter.doFilter
    1. org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
    1 frame
  38. Jetty
    AbstractConnection$2.run
    1. org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    2. org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    3. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    4. org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
    5. org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    6. org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    7. org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    8. org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    9. org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    10. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    11. org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    12. org.eclipse.jetty.server.Server.handle(Server.java:499)
    13. org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
    14. org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    15. org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
    15 frames
  39. winstone
    BoundedExecutorService$1.run
    1. winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
    1 frame
  40. Java RT
    ThreadPoolExecutor$Worker.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    2 frames