-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins 2.222.3 LTS, Jira plugin 3.0.16, Blue Ocean 1.23.2
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.
- links to