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

java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils after Jira 3.0.16 upgrade

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: jira-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.222.3 LTS, Jira plugin 3.0.16, Blue Ocean 1.23.2
    • Similar Issues:

      Description

      After upgrading several plugins to their latest versions today, including upgrading the Jira plugin to 3.0.16, I encountered this on one of the initial builds after the service restart:

      00:00:57.897  java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils
      00:00:57.897  	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1387)
      00:00:57.897  	at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1342)
      00:00:57.897  	at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1089)
      00:00:57.897  	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
      00:00:57.897  Caused: java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
      00:00:57.897  	at com.atlassian.jira.rest.client.internal.async.AsynchronousSearchRestClient.searchJql(AsynchronousSearchRestClient.java:90)
      00:00:57.897  	at hudson.plugins.jira.JiraRestService.getIssuesFromJqlSearch(JiraRestService.java:206)
      00:00:57.897  	at hudson.plugins.jira.JiraSession.getIssuesFromJqlSearch(JiraSession.java:136)
      00:00:57.897  	at io.jenkins.blueocean.service.embedded.jira.JiraSCMListener.onChangeLogParsed(JiraSCMListener.java:52)
      00:00:57.897  	at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:865)
      00:00:57.897  	at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1000(WorkflowRun.java:137)
      00:00:57.897  	at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1157)
      00:00:57.897  	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:150)
      00:00:57.897  	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
      00:00:57.897  	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
      00:00:57.897  	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      00:00:57.897  	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      00:00:57.897  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      00:00:57.897  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      00:00:57.897  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      00:00:57.897  	at java.lang.Thread.run(Thread.java:748)
      

      This error then caused this (which I believe is unrelated behavior from cleanWs when an error prevents the allocation of an agent and thus a workspace, discussed at JENKINS-54278):

      00:00:57.410  Error when executing cleanup post condition:
      00:00:57.433  java.lang.IllegalArgumentException: Failed to prepare cleanWs step
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.DSL.invokeDescribable(DSL.java:419)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:182)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
      00:00:57.433  	at sun.reflect.GeneratedMethodAccessor339.invoke(Unknown Source)
      00:00:57.433  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      00:00:57.433  	at java.lang.reflect.Method.invoke(Method.java:498)
      00:00:57.433  	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      00:00:57.433  	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      00:00:57.433  	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
      00:00:57.433  	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      00:00:57.433  	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
      00:00:57.433  	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      00:00:57.433  	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      00:00:57.433  	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
      00:00:57.433  	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
      00:00:57.433  	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157)
      00:00:57.433  	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
      00:00:57.433  	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
      00:00:57.433  	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
      00:00:57.433  	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
      00:00:57.433  	at WorkflowScript.run(WorkflowScript:135)
      00:00:57.433  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.delegateAndExecute(ModelInterpreter.groovy:137)
      00:00:57.433  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.runPostConditions(ModelInterpreter.groovy:756)
      00:00:57.433  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.catchRequiredContextForNode(ModelInterpreter.groovy:395)
      00:00:57.433  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.catchRequiredContextForNode(ModelInterpreter.groovy:393)
      00:00:57.433  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.runPostConditions(ModelInterpreter.groovy:755)
      00:00:57.433  	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2030)
      00:00:57.433  	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2015)
      00:00:57.433  	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2056)
      00:00:57.433  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.runPostConditions(ModelInterpreter.groovy:745)
      00:00:57.433  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.runPostConditions(ModelInterpreter.groovy)
      00:00:57.433  	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.executePostBuild(ModelInterpreter.groovy:723)
      00:00:57.433  	at ___cps.transform___(Native Method)
      00:00:57.433  	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
      00:00:57.433  	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
      00:00:57.433  	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixName(FunctionCallBlock.java:78)
      00:00:57.433  	at sun.reflect.GeneratedMethodAccessor318.invoke(Unknown Source)
      00:00:57.433  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      00:00:57.433  	at java.lang.reflect.Method.invoke(Method.java:498)
      00:00:57.433  	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      00:00:57.433  	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
      00:00:57.433  	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
      00:00:57.433  	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
      00:00:57.433  	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
      00:00:57.433  	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
      00:00:57.433  	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
      00:00:57.433  	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:400)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:312)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:276)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
      00:00:57.433  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      00:00:57.433  	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
      00:00:57.433  	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      00:00:57.433  	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
      00:00:57.433  	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      00:00:57.433  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      00:00:57.433  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      00:00:57.433  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      00:00:57.433  	at java.lang.Thread.run(Thread.java:748)
      00:00:57.433  Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing
      00:00:57.433  Perhaps you forgot to surround the code with a step that provides this, such as: node, dockerNode
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.CpsStepContext.replay(CpsStepContext.java:496)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:317)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.DSL.invokeDescribable(DSL.java:417)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:182)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
      00:00:57.433  	at sun.reflect.GeneratedMethodAccessor339.invoke(Unknown Source)
      00:00:57.433  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      00:00:57.433  	at java.lang.reflect.Method.invoke(Method.java:498)
      00:00:57.433  	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      00:00:57.433  	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      00:00:57.433  	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
      00:00:57.433  	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      00:00:57.433  	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
      00:00:57.433  	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      00:00:57.433  	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      00:00:57.433  	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
      00:00:57.433  	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
      00:00:57.433  	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157)
      00:00:57.433  	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
      00:00:57.433  	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
      00:00:57.433  	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
      00:00:57.433  	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
      00:00:57.433  	... 31 more
      00:00:57.433  Caused by: org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing
      00:00:57.433  Perhaps you forgot to surround the code with a step that provides this, such as: node, dockerNode
      00:00:57.433  	at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:266)
      00:00:57.433  	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:263)
      00:00:57.433  	... 51 more
      

      Rerunning the same job on the same node succeeded, so I'm not sure to what to attribute this failure, or what caused it to resolve itself, but wanted to capture the stack trace here in case it's useful.

        Attachments

          Issue Links

            Activity

            Hide
            olamy Olivier Lamy added a comment -

            release done.

            Thanks for the fix

            Show
            olamy Olivier Lamy added a comment - release done. Thanks for the fix
            Hide
            markewaite Mark Waite added a comment -

            I've confirmed that the build from the proposed pull request resolves the issue for me. I've updated the plugin in my Docker image to use the PR build. Thanks very much for the pull request.

            Show
            markewaite Mark Waite added a comment - I've confirmed that the build from the proposed pull request resolves the issue for me. I've updated the plugin in my Docker image to use the PR build. Thanks very much for the pull request.
            Hide
            geoffbp Geoff Powell added a comment -

            +1 on this, we also had to downgrade to 3.0.15 and are seeing the same error

             

            java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
            
            Show
            geoffbp Geoff Powell added a comment - +1 on this, we also had to downgrade to 3.0.15 and are seeing the same error   java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
            Hide
            markewaite Mark Waite added a comment -

            Thanks very much for finding the error and reporting the workaround! I see the failure on my JENKINS-43931 test job as:

            java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
            	at com.atlassian.jira.rest.client.internal.async.AsynchronousSearchRestClient.searchJql(AsynchronousSearchRestClient.java:90)
            	at hudson.plugins.jira.JiraRestService.getIssuesFromJqlSearch(JiraRestService.java:206)
            	at hudson.plugins.jira.JiraSession.getIssuesFromJqlSearch(JiraSession.java:136)
            	at io.jenkins.blueocean.service.embedded.jira.JiraSCMListener.onChangeLogParsed(JiraSCMListener.java:52)
            	at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:865)
            	at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1000(WorkflowRun.java:137)
            	at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1157)
            	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:150)
            	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
            	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
            	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
            	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
            	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
            	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
            	at java.lang.Thread.run(Thread.java:748)
            Finished: FAILURE
            

            My failing job has no explicit reference to Jira, though I have configured my Jira plugin to automatically convert JENKINS-xxxx references to hyperlinks.

            Downgrade to 3.0.15 fixed it for me as well.

            Show
            markewaite Mark Waite added a comment - Thanks very much for finding the error and reporting the workaround! I see the failure on my JENKINS-43931 test job as: java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils at com.atlassian.jira.rest.client.internal.async.AsynchronousSearchRestClient.searchJql(AsynchronousSearchRestClient.java:90) at hudson.plugins.jira.JiraRestService.getIssuesFromJqlSearch(JiraRestService.java:206) at hudson.plugins.jira.JiraSession.getIssuesFromJqlSearch(JiraSession.java:136) at io.jenkins.blueocean.service.embedded.jira.JiraSCMListener.onChangeLogParsed(JiraSCMListener.java:52) at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:865) at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1000(WorkflowRun.java:137) at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1157) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:150) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Finished: FAILURE My failing job has no explicit reference to Jira, though I have configured my Jira plugin to automatically convert JENKINS-xxxx references to hyperlinks. Downgrade to 3.0.15 fixed it for me as well.
            Hide
            ccach Caroline Chao added a comment - - edited

            Thanks Éric Louvard and Stefan Thurnherr for the workaround. We have the same error, and downgrading fixes the problem for us too.

            Builds are failing when commits are containing a Jira ID (the link is created but the job failed with the error mentionned above). Commits without a Jira ID are completing as expected.

            Show
            ccach Caroline Chao added a comment - - edited Thanks  Éric Louvard and Stefan Thurnherr  for the workaround. We have the same error, and downgrading fixes the problem for us too. Builds are failing when commits are containing a Jira ID (the link is created but the job failed with the error mentionned above). Commits without a Jira ID are completing as expected.
            Hide
            stefanthurnherr Stefan Thurnherr added a comment -

            Same problem here, multibranch pipeline build using a declarative Jenkinsfile fails during initial "Declarative: Checkout SCM" stage after upgrading jira plugin from 3.0.15 to 3.0.16, see stacktrace below. Note that the first exception (MissingContextVariableException) is a follow-up exception occuring during the post-cleanup step because the checkout failed.
            Downgrading to 3.0.15 solves the problem.

            [...]
             > git config core.sparsecheckout # timeout=10
             > git checkout -f e60c85b84537834563448e0e73c7c112c66e2985 # timeout=10
             > git branch -a -v --no-abbrev # timeout=10
             > git checkout -b master e60c85b84537834563448e0e73c7c112c66e2985 # timeout=10
             > git rev-list --no-walk 5d14274cb6b3f0e1d721e822e6d060c343eaae06 # timeout=10
            [Pipeline] }
            [Pipeline] // stage
            [Pipeline] }
            [Pipeline] // node
            [Pipeline] stage
            [Pipeline] { (Declarative: Post Actions)
            [Pipeline] deleteDir
            Error when executing cleanup post condition:
            org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing
            Perhaps you forgot to surround the code with a step that provides this, such as: node
            	at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:266)
            	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:263)
            	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:179)
            	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
            	at jdk.internal.reflect.GeneratedMethodAccessor196.invoke(Unknown Source)
            	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
            	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
            	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
            	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
            	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
            	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
            	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
            	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163)
            	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
            	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157)
            	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161)
            	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165)
            	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135)
            	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
            	at WorkflowScript.run(WorkflowScript:62)
            	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.delegateAndExecute(ModelInterpreter.groovy:137)
            	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.runPostConditions(ModelInterpreter.groovy:756)
            	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.catchRequiredContextForNode(ModelInterpreter.groovy:395)
            	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.catchRequiredContextForNode(ModelInterpreter.groovy:393)
            	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.runPostConditions(ModelInterpreter.groovy:755)
            	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2030)
            	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2015)
            	at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2056)
            	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.runPostConditions(ModelInterpreter.groovy:745)
            	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.runPostConditions(ModelInterpreter.groovy)
            	at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.executePostBuild(ModelInterpreter.groovy:723)
            	at ___cps.transform___(Native Method)
            	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86)
            	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113)
            	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixName(FunctionCallBlock.java:78)
            	at jdk.internal.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
            	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
            	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
            	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
            	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
            	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
            	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
            	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
            	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
            	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
            	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
            	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
            	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
            	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:400)
            	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
            	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:312)
            	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:276)
            	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
            	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
            	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
            	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
            	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
            	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            	at java.base/java.lang.Thread.run(Thread.java:834)
            
            [Pipeline] }
            [Pipeline] // stage
            [Pipeline] End of Pipeline
            java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils
            	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1387)
            	at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1342)
            	at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1089)
            	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
            Caused: java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
            	at com.atlassian.jira.rest.client.internal.async.AsynchronousSearchRestClient.searchJql(AsynchronousSearchRestClient.java:90)
            	at hudson.plugins.jira.JiraRestService.getIssuesFromJqlSearch(JiraRestService.java:206)
            	at hudson.plugins.jira.JiraSession.getIssuesFromJqlSearch(JiraSession.java:136)
            	at io.jenkins.blueocean.service.embedded.jira.JiraSCMListener.onChangeLogParsed(JiraSCMListener.java:52)
            	at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:865)
            	at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1000(WorkflowRun.java:137)
            	at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1157)
            	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:150)
            	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
            	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
            	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
            	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
            	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            	at java.base/java.lang.Thread.run(Thread.java:834)
            Finished: FAILURE
            
            Show
            stefanthurnherr Stefan Thurnherr added a comment - Same problem here, multibranch pipeline build using a declarative Jenkinsfile fails during initial "Declarative: Checkout SCM" stage after upgrading jira plugin from 3.0.15 to 3.0.16, see stacktrace below. Note that the first exception (MissingContextVariableException) is a follow-up exception occuring during the post-cleanup step because the checkout failed. Downgrading to 3.0.15 solves the problem. [...] > git config core.sparsecheckout # timeout=10 > git checkout -f e60c85b84537834563448e0e73c7c112c66e2985 # timeout=10 > git branch -a -v --no-abbrev # timeout=10 > git checkout -b master e60c85b84537834563448e0e73c7c112c66e2985 # timeout=10 > git rev-list --no-walk 5d14274cb6b3f0e1d721e822e6d060c343eaae06 # timeout=10 [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] stage [Pipeline] { (Declarative: Post Actions) [Pipeline] deleteDir Error when executing cleanup post condition: org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing Perhaps you forgot to surround the code with a step that provides this , such as: node at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:266) at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:263) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:179) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122) at jdk.internal.reflect.GeneratedMethodAccessor196.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:163) at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) at WorkflowScript.run(WorkflowScript:62) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.delegateAndExecute(ModelInterpreter.groovy:137) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.runPostConditions(ModelInterpreter.groovy:756) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.catchRequiredContextForNode(ModelInterpreter.groovy:395) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.catchRequiredContextForNode(ModelInterpreter.groovy:393) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.runPostConditions(ModelInterpreter.groovy:755) at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2030) at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2015) at com.cloudbees.groovy.cps.CpsDefaultGroovyMethods.each(CpsDefaultGroovyMethods:2056) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.runPostConditions(ModelInterpreter.groovy:745) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.runPostConditions(ModelInterpreter.groovy) at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.executePostBuild(ModelInterpreter.groovy:723) at ___cps.transform___(Native Method) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixName(FunctionCallBlock.java:78) at jdk.internal.reflect.GeneratedMethodAccessor165.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:83) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163) at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129) at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:400) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:312) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:276) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang. Thread .run( Thread .java:834) [Pipeline] } [Pipeline] // stage [Pipeline] End of Pipeline java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1387) at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1342) at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1089) at java.base/java.lang. ClassLoader .loadClass( ClassLoader .java:522) Caused: java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils at com.atlassian.jira. rest .client.internal.async.AsynchronousSearchRestClient.searchJql(AsynchronousSearchRestClient.java:90) at hudson.plugins.jira.JiraRestService.getIssuesFromJqlSearch(JiraRestService.java:206) at hudson.plugins.jira.JiraSession.getIssuesFromJqlSearch(JiraSession.java:136) at io.jenkins.blueocean.service.embedded.jira.JiraSCMListener.onChangeLogParsed(JiraSCMListener.java:52) at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:865) at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1000(WorkflowRun.java:137) at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1157) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:150) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang. Thread .run( Thread .java:834) Finished: FAILURE
            Hide
            ericlouvard Éric Louvard added a comment -

            I kann solve the Problem with downgrading jira plugin to 3.0.15
            Issue is critical because it potentially block scm checkout:

            java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils
            	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1387)
            	at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1342)
            	at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1089)
            	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
            Caused: java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
            	at com.atlassian.jira.rest.client.internal.async.AsynchronousSearchRestClient.searchJql(AsynchronousSearchRestClient.java:90)
            	at hudson.plugins.jira.JiraRestService.getIssuesFromJqlSearch(JiraRestService.java:206)
            	at hudson.plugins.jira.JiraSession.getIssuesFromJqlSearch(JiraSession.java:136)
            	at io.jenkins.blueocean.service.embedded.jira.JiraSCMListener.onChangeLogParsed(JiraSCMListener.java:52)
            	at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:865)
            	at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1000(WorkflowRun.java:137)
            	at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1157)
            	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:150)
            	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:155)
            	at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:142)
            	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
            	at hudson.model.ResourceController.execute(ResourceController.java:97)
            	at hudson.model.Executor.run(Executor.java:428)
            Finished: FAILURE
            
            Show
            ericlouvard Éric Louvard added a comment - I kann solve the Problem with downgrading jira plugin to 3.0.15 Issue is critical because it potentially block scm checkout: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1387) at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1342) at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1089) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) Caused: java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils at com.atlassian.jira.rest.client.internal.async.AsynchronousSearchRestClient.searchJql(AsynchronousSearchRestClient.java:90) at hudson.plugins.jira.JiraRestService.getIssuesFromJqlSearch(JiraRestService.java:206) at hudson.plugins.jira.JiraSession.getIssuesFromJqlSearch(JiraSession.java:136) at io.jenkins.blueocean.service.embedded.jira.JiraSCMListener.onChangeLogParsed(JiraSCMListener.java:52) at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:865) at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1000(WorkflowRun.java:137) at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1157) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:150) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:155) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:142) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) Finished: FAILURE
            Show
            medianick Nick Jones added a comment - - edited This commons-lang3 dependency looks to have been excluded via  https://github.com/jenkinsci/jira-plugin/pull/224/commits/a6484c0a00f5875a1cb6ac418f142db07190829a , and yet imported at https://github.com/jenkinsci/jira-plugin/commit/023d952e2fc00fe716a1680075ffd297b18c006a

              People

              Assignee:
              olamy Olivier Lamy
              Reporter:
              medianick Nick Jones
              Votes:
              17 Vote for this issue
              Watchers:
              25 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: