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

java.lang.NullPointerException: Cannot invoke "org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner.get()" because "this.executionRef" is null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • workflow-cps-plugin
    • None
    • workflow-cps 3837.v305192405b_c0, Jenkins 2.440, lockable-resources 1224.v5e9500f98269

      I have job using Jenkinsfile running some stages in parallel. 

      Updating lockable-resource plugin from 1215.v895f61d7f794 version to 1224.v5e9500f98269 version the job build fails with the following exception:

       
      [id=2528]        WARNING        h.ExpressionFactory2$JexlExpression#evaluate: Caught exception evaluating: it.getQueue() in /lockable-resources/. Reason: java.lang.NullPointerException: Cannot invoke "org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner.get()" because "this.executionRef" is null
      invoke "org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner.get()" because "this.executionRef" is null
            at org.jenkinsci.plugins.workflow.cps.CpsStepContext.getExecution(CpsStepContext.java:217)
            at org.jenkinsci.plugins.workflow.cps.CpsStepContext.getThreadGroupSynchronously(CpsStepContext.java:242)
            at org.jenkinsci.plugins.workflow.cps.CpsStepContext.getThreadSynchronously(CpsStepContext.java:236)
            at org.jenkinsci.plugins.workflow.cps.CpsStepContext.doGet(CpsStepContext.java:293)
            at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:75)
            at org.jenkins.plugins.lockableresources.queue.QueuedContextStruct.getBuild(QueuedContextStruct.java:77)
            at org.jenkins.plugins.lockableresources.actions.LockableResourcesRootAction.getQueue(LockableResourcesRootAction.java:301)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.base/java.lang.reflect.Method.invoke(Method.java:568)
            at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258)
            at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104)
            at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
            at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
            at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
            at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
            at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:76)
            at org.apache.commons.jelly.tags.core.CoreTagLibrary$3.run(CoreTagLibrary.java:134)
            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:99)
            at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:172)
            at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:265)
            at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:101)
            at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
            at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:101)
            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:265)
            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:265)
            at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:101)
            at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
            at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:265)
            at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
            at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
            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:122)
            at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
            at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:101)
            at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
            at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:265)
            at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
            at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:101)
            at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
            at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:101)
            at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
            at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:101)
            at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
            at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:101)
            at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
            at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:101)
            at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
            at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:265)
            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:122)
            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:122)
            at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
            at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:99)
            at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:66)
            at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:55)
            at org.kohsuke.stapler.jelly.ScriptInvoker.execute(ScriptInvoker.java:56)
            at org.kohsuke.stapler.jelly.ScriptInvoker.execute(ScriptInvoker.java:43)
            at org.kohsuke.stapler.Facet.handleIndexRequest(Facet.java:284)
            at org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:104)
            at org.kohsuke.stapler.IndexViewDispatcher.dispatch(IndexViewDispatcher.java:32)
            at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:770)
            at org.kohsuke.stapler.Stapler.invoke(Stapler.java:900)
            at org.kohsuke.stapler.MetaClass$9.dispatch(MetaClass.java:475)
            at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:770)
            at org.kohsuke.stapler.Stapler.invoke(Stapler.java:900)
            at org.kohsuke.stapler.Stapler.invoke(Stapler.java:698)
            at org.kohsuke.stapler.Stapler.service(Stapler.java:248)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
            at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
            at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665)
            at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:163)
            at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:248)
            at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160)
            at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:89)
            at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160)
            at hudson.plugins.locale.LocaleFilter.doFilter(LocaleFilter.java:39)
            at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160)
            at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:60)
            at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160)
            at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
            at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160)
            at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
            at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
            at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
            at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:121)
            at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160)
            at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
            at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160)
            at jenkins.util.HttpServletFilter$1.doFilter(HttpServletFilter.java:76)
            at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:160)
            at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:166)
            at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
            at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
            at jenkins.ErrorAttributeFilter.doFilter(ErrorAttributeFilter.java:29)
            at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
            at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
            at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:160)
            at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
            at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
            at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:94)
            at jenkins.security.AcegiSecurityExceptionFilter.doFilter(AcegiSecurityExceptionFilter.java:52)
            at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
            at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:54)
            at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
            at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126)
            at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120)
            at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
            at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100)
            at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
            at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:110)
            at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:101)
            at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
            at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227)
            at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221)
            at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
            at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:97)
            at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
            at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:117)
            at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
            at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:63)
            at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:99)
            at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:111)
            at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:172)
            at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
            at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
            at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:53)
            at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
            at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
            at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:86)
            at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
            at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
            at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
            at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
            at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
            at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:38)
            at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
            at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
            at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527)
            at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
            at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:569)
            at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
            at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
            at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1570)
            at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
            at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384)
            at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
            at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484)
            at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1543)
            at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
            at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306)
            at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
            at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
            at org.eclipse.jetty.server.Server.handle(Server.java:563)
            at org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598)
            at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753)
            at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501)
            at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:287)
            at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)
            at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
            at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
            at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421)
            at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390)
            at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277)
            at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:199)
            at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)
            at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)
            at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)
            at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)
            at java.base/java.lang.Thread.run(Thread.java:833)
       
      However one stage fails (always second). Three others run fine.

      But other jobs (on different branches) can fail on many stages.

            Unassigned Unassigned
            kaniapm Piotr Kania
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: