title: Unable to run any Jenkins pipeline after upgrade
body: <p>After updating some plugins related to the pipeline declarative model from v1.1.9 to v1.2 I'm unable even to run the simplest of pipelines, not to say that all my existing pipelines are not working. </p>
  
  <p>A simple pipeline would be e.g. </p>
  
  <pre><code>pipeline {
      agent any
      stages {
          stage('build') {
              steps {
                  echo 'hello world'
              }
          }
      }
  }
  </code></pre>
  
  <p>And the error is always the same for all cases:</p>
  
  <pre><code>Started by user Roger
  Obtained Jenkinsfile from git devops@code.careesma.net:chef-repo.git
  [Pipeline] End of Pipeline
  java.lang.ClassNotFoundException: java.util.function.Function
      at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1373)
      at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
      at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2625)
      at java.lang.Class.privateGetPublicMethods(Class.java:2743)
      at java.lang.Class.getMethods(Class.java:1480)
      at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1280)
      at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1141)
      at java.beans.Introspector.getBeanInfo(Introspector.java:416)
      at java.beans.Introspector.getBeanInfo(Introspector.java:163)
      at java.beans.Introspector.getBeanInfo(Introspector.java:250)
      at java.beans.Introspector.&lt;init&gt;(Introspector.java:397)
      at java.beans.Introspector.getBeanInfo(Introspector.java:163)
      at groovy.lang.MetaClassImpl$15.run(MetaClassImpl.java:3290)
      at java.security.AccessController.doPrivileged(Native Method)
      at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3288)
      at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3265)
      at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:254)
      at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:285)
      at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:258)
      at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:881)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallConstructorSite(CallSiteArray.java:87)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
      at org.kohsuke.groovy.sandbox.impl.Checker$3.call(Checker.java:198)
      at org.kohsuke.groovy.sandbox.GroovyInterceptor.onNewInstance(GroovyInterceptor.java:42)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onNewInstance(SandboxInterceptor.java:146)
      at org.kohsuke.groovy.sandbox.impl.Checker$3.call(Checker.java:195)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedConstructor(Checker.java:200)
      at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.constructorCall(SandboxInvoker.java:21)
  Caused: java.lang.NoClassDefFoundError: java/util/function/Function
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2625)
      at java.lang.Class.privateGetPublicMethods(Class.java:2743)
      at java.lang.Class.getMethods(Class.java:1480)
      at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1280)
      at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1141)
      at java.beans.Introspector.getBeanInfo(Introspector.java:416)
      at java.beans.Introspector.getBeanInfo(Introspector.java:163)
      at java.beans.Introspector.getBeanInfo(Introspector.java:250)
      at java.beans.Introspector.&lt;init&gt;(Introspector.java:397)
      at java.beans.Introspector.getBeanInfo(Introspector.java:163)
      at groovy.lang.MetaClassImpl$15.run(MetaClassImpl.java:3290)
      at java.security.AccessController.doPrivileged(Native Method)
      at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3288)
      at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3265)
      at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:254)
      at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:285)
      at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:258)
      at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:881)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallConstructorSite(CallSiteArray.java:87)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
      at org.kohsuke.groovy.sandbox.impl.Checker$3.call(Checker.java:198)
      at org.kohsuke.groovy.sandbox.GroovyInterceptor.onNewInstance(GroovyInterceptor.java:42)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onNewInstance(SandboxInterceptor.java:146)
      at org.kohsuke.groovy.sandbox.impl.Checker$3.call(Checker.java:195)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedConstructor(Checker.java:200)
      at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.constructorCall(SandboxInvoker.java:21)
      at WorkflowScript.run(WorkflowScript)
      at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.call(jar:file:/var/lib/jenkins/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:54)
      at WorkflowScript.run(WorkflowScript:1)
      at ___cps.transform___(Native Method)
      at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:96)
      at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
      at sun.reflect.GeneratedMethodAccessor551.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
      at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      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:122)
      at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261)
      at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:19)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:35)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:32)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:32)
      at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:330)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:82)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:242)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:230)
      at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
      at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
  Finished: FAILURE
  </code></pre>
  
  <p>There was a warning in the plugin page about running jobs, but nothing on breaking the syntax. <a href="https://wiki.jenkins.io/display/JENKINS/Pipeline+Model+Definition+Plugin" rel="nofollow noreferrer">https://wiki.jenkins.io/display/JENKINS/Pipeline+Model+Definition+Plugin</a></p>
  
  <p>Any idea how to solve it?</p>