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

Type java.lang$Enum not present when updating 2.6 to 2.7

    XMLWordPrintable

Details

    • Pipeline - April 2018

    Description

      When Updating to the to the latest version of the workflow-api-plugin 2.7 the executing of my pipeline breaks with the following error backtrace:

      Error Backtrace

      java.lang.TypeNotPresentException: Type java.lang$Enum not present
      at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)
      at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
      at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
      at sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:90)
      at java.lang.Class.getGenericSuperclass(Class.java:777)
      at com.sun.beans.TypeResolver.prepare(TypeResolver.java:308)
      at com.sun.beans.TypeResolver.resolve(TypeResolver.java:185)
      at com.sun.beans.TypeResolver.resolve(TypeResolver.java:218)
      at com.sun.beans.TypeResolver.resolve(TypeResolver.java:169)
      at com.sun.beans.TypeResolver.resolveInClass(TypeResolver.java:81)
      at java.beans.FeatureDescriptor.getReturnType(FeatureDescriptor.java:370)
      at java.beans.PropertyDescriptor.findPropertyType(PropertyDescriptor.java:648)
      at java.beans.PropertyDescriptor.updateGenericsFor(PropertyDescriptor.java:623)
      at java.beans.Introspector.addPropertyDescriptor(Introspector.java:605)
      at java.beans.Introspector.addPropertyDescriptors(Introspector.java:614)
      at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:467)
      at java.beans.Introspector.getBeanInfo(Introspector.java:428)
      at java.beans.Introspector.getBeanInfo(Introspector.java:173)
      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.callsite.ClassMetaClassGetPropertySite.<init>(ClassMetaClassGetPropertySite.java:38)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.createClassMetaClassGetPropertySite(AbstractCallSite.java:373)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.createGetPropertySite(AbstractCallSite.java:325)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.acceptGetProperty(AbstractCallSite.java:312)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
      at packageInstaller.call(packageInstaller.groovy)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      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:1215)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:812)
      at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:100)
      at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source)
      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:151)
      at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:21)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:115)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:103)
      at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:146)
      at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:16)
      at WorkflowScript.run(WorkflowScript:102)
      at __cps.transform__(Native Method)
      at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
      at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
      at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
      at sun.reflect.GeneratedMethodAccessor210.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:103)
      at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
      at sun.reflect.GeneratedMethodAccessor210.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      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:58)
      at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30)
      at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:163)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:324)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:78)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:236)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:224)
      at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:63)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      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:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.ClassNotFoundException: java.lang$Enum
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:677)
      at groovy.lang.GroovyClassLoader$InnerLoader.loadClass(GroovyClassLoader.java:425)
      at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:787)
      at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:775)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:348)
      at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
      at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
      at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
      at sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:90)
      at java.lang.Class.getGenericSuperclass(Class.java:777)
      at com.sun.beans.TypeResolver.prepare(TypeResolver.java:308)
      at com.sun.beans.TypeResolver.resolve(TypeResolver.java:185)
      at com.sun.beans.TypeResolver.resolve(TypeResolver.java:218)
      at com.sun.beans.TypeResolver.resolve(TypeResolver.java:169)
      at com.sun.beans.TypeResolver.resolveInClass(TypeResolver.java:81)
      at java.beans.FeatureDescriptor.getReturnType(FeatureDescriptor.java:370)
      at java.beans.PropertyDescriptor.findPropertyType(PropertyDescriptor.java:648)
      at java.beans.PropertyDescriptor.updateGenericsFor(PropertyDescriptor.java:623)
      at java.beans.Introspector.addPropertyDescriptor(Introspector.java:605)
      at java.beans.Introspector.addPropertyDescriptors(Introspector.java:614)
      at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:467)
      at java.beans.Introspector.getBeanInfo(Introspector.java:428)
      at java.beans.Introspector.getBeanInfo(Introspector.java:173)
      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.callsite.ClassMetaClassGetPropertySite.<init>(ClassMetaClassGetPropertySite.java:38)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.createClassMetaClassGetPropertySite(AbstractCallSite.java:373)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.createGetPropertySite(AbstractCallSite.java:325)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.acceptGetProperty(AbstractCallSite.java:312)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
      at packageInstaller.call(packageInstaller.groovy)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      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:1215)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:812)
      at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:100)
      at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source)
      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:151)
      at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:21)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:115)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:103)
      at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:146)
      at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:16)
      ... 35 more

      I have no real idea what to look for in my pipeline script. I am not using any Enum Type myself. This issue makes it impossible for me to update the pipeline api plugin.

      With version 2.6 of the workflow-api-plugin everything works just fine.

      Attachments

        Issue Links

          Activity

            People

              abayer Andrew Bayer
              nitram Martin Karing
              Votes:
              4 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: