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

Pipeline fails after server restart with "java.lang.TypeNotPresentException: Type java.lang$Enum not present"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None

      Issue Description

      Disclaimer: seems related to https://issues.jenkins-ci.org/browse/JENKINS-40117, however no upgrade involved in this case, just restarting the server.

      Our server has been restarted. I think it has been restarted via /restart or /safeRestart because there is no mention of "TERM trapped.  Shutting down" in the wrapper log (see below).

      Immediately after restart, all pipeline jobs that had still steps to process have failed with the exception below, when they have moved execution to the next step (it happened on the master and on slaves). Following the error, execution of all pipelines on the master systematically shows the same error.

      Restarting the server from the command line, while no job was running, was enough to solve the issue.

      Error during job execution

       

      # ... logs from the step currently being executed on slave ...
      
      Resuming build at Tue Oct 17 18:29:07 CEST 2017 after Jenkins restart Waiting to resume part of TPM_Benchmarks_for_BOR_Refresh » TPM_EQD - v3.1.build.dev.47895.bor.refresh.pac (Headline) #63: ??? Ready to run at Tue Oct 17 18:29:09 CEST 2017
      
      # ... more logs from the current step ...
      
      [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.codehaus.groovy.runtime.callsite.CallSiteArray$1.run(CallSiteArray.java:68) at org.codehaus.groovy.runtime.callsite.CallSiteArray$1.run(CallSiteArray.java:65) at java.security.AccessController.doPrivileged(Native Method) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:65) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:162) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:18) at StepExecutor.executeStep(/data/jenkins/home/jobs/TPM_Benchmarks_for_BOR_Refresh/jobs/0006.TPM_EQD-Headline/builds/63/libs/pac-lib/vars/stepExecutorFactory.groovy:119) at WorkflowScript.run(WorkflowScript:147) 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.GeneratedMethodAccessor724.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.LocalVariableBlock$LocalVariable.get(LocalVariableBlock.java:39) at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30) at com.cloudbees.groovy.cps.impl.LocalVariableBlock.evalLValue(LocalVariableBlock.java:28) at com.cloudbees.groovy.cps.LValueBlock$BlockImpl.eval(LValueBlock.java:55) at com.cloudbees.groovy.cps.LValueBlock.eval(LValueBlock.java:16) 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.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:646) at java.beans.PropertyDescriptor.updateGenericsFor(PropertyDescriptor.java:621) 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.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:258) at org.codehaus.groovy.runtime.InvokerHelper.getMetaClass(InvokerHelper.java:881) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:75) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:56) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:194) at StepResult.<clinit>(stepExecutorFactory.groovy) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.codehaus.groovy.runtime.callsite.CallSiteArray$1.run(CallSiteArray.java:68) at org.codehaus.groovy.runtime.callsite.CallSiteArray$1.run(CallSiteArray.java:65) at java.security.AccessController.doPrivileged(Native Method) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:65) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:162) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:18) ... 33 more 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) ... 72 more

       

      Error for jobs started after initial error

      EnvInject] - Loading node environment variables.
      Building on master in workspace /data/jenkins/home/jobs/bench-job-generator-by-benchmark/workspace
       > git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
       > git config remote.origin.url https://jenkins@stash.murex.com/scm/pac/pac-ci.git # timeout=10
      Cleaning workspace
       > git rev-parse --verify HEAD # timeout=10
      Resetting working tree
       > git reset --hard # timeout=10
       > git clean -fdx # timeout=10
      Fetching upstream changes from https://jenkins@stash.murex.com/scm/pac/pac-ci.git
       > git --version # timeout=10
      using GIT_ASKPASS to set credentials Jenkins generic user to interact with related systems
       > git fetch --tags --progress https://jenkins@stash.murex.com/scm/pac/pac-ci.git +refs/heads/*:refs/remotes/origin/*
       > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
       > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
      Checking out Revision bee92a9da347b51d8570af8727c51528d4b2137b (refs/remotes/origin/master)
       > git config core.sparsecheckout # timeout=10
       > git checkout -f bee92a9da347b51d8570af8727c51528d4b2137b
       > git rev-list bee92a9da347b51d8570af8727c51528d4b2137b # timeout=10
      Processing DSL script build_pipeline_by_bench.dsl
      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:646)
      	at java.beans.PropertyDescriptor.updateGenericsFor(PropertyDescriptor.java:621)
      	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 build_pipeline_by_bench.run(build_pipeline_by_bench.dsl:39)
      	at build_pipeline_by_bench$run.call(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      	at build_pipeline$run.call(Unknown Source)
      	at javaposse.jobdsl.dsl.DslScriptLoader.runScriptEngine(DslScriptLoader.groovy:129)
      	at javaposse.jobdsl.dsl.DslScriptLoader.this$2$runScriptEngine(DslScriptLoader.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:497)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:384)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:69)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
      	at javaposse.jobdsl.dsl.DslScriptLoader$_runScriptsWithClassLoader_closure1.doCall(DslScriptLoader.groovy:78)
      	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:497)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1024)
      	at groovy.lang.Closure.call(Closure.java:414)
      	at groovy.lang.Closure.call(Closure.java:430)
      	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2030)
      	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2015)
      	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2068)
      	at org.codehaus.groovy.runtime.dgm$164.invoke(Unknown Source)
      	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
      	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      	at javaposse.jobdsl.dsl.DslScriptLoader.runScriptsWithClassLoader(DslScriptLoader.groovy:68)
      	at javaposse.jobdsl.dsl.DslScriptLoader.this$2$runScriptsWithClassLoader(DslScriptLoader.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:497)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182)
      	at javaposse.jobdsl.dsl.DslScriptLoader.runScripts(DslScriptLoader.groovy:44)
      	at javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:352)
      	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      	at hudson.model.Build$BuildExecution.build(Build.java:205)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:162)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      	at hudson.model.Run.execute(Run.java:1741)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      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)
      	... 83 more
      ERROR: Type java.lang$Enum not present
      Finished: FAILURE
      

      Wrapper log at time of restart

       

      STATUS | wrapper | 2017/10/17 18:26:07 | Pinging the JVM took 12 seconds to respond.
      STATUS | wrapper | 2017/10/17 18:26:07 | Pinging the JVM took 8 seconds to respond.
      STATUS | wrapper | 2017/10/17 18:26:41 | Pinging the JVM took 10 seconds to respond.
      STATUS | wrapper | 2017/10/17 18:27:01 | Pinging the JVM took 13 seconds to respond.
      STATUS | wrapper | 2017/10/17 18:27:30 | Pinging the JVM took 38 seconds to respond.
      STATUS | wrapper | 2017/10/17 18:27:31 | Pinging the JVM took 34 seconds to respond.
      STATUS | wrapper | 2017/10/17 18:27:33 | Pinging the JVM took 32 seconds to respond.
      STATUS | wrapper | 2017/10/17 18:27:33 | Pinging the JVM took 28 seconds to respond.
      STATUS | wrapper | 2017/10/17 18:27:36 | Pinging the JVM took 28 seconds to respond.
      STATUS | wrapper | 2017/10/17 18:28:11 | JVM appears hung: Timed out waiting for signal from JVM. Restarting JVM.
      ERROR | wrapper | 2017/10/17 18:28:45 | Shutdown failed: Timed out waiting for signal from JVM.
      ERROR | wrapper | 2017/10/17 18:28:45 | JVM did not exit on request, termination requested.
      STATUS | wrapper | 2017/10/17 18:28:45 | JVM received a signal SIGKILL (9).
      STATUS | wrapper | 2017/10/17 18:28:45 | JVM process is gone.
      STATUS | wrapper | 2017/10/17 18:28:45 | JVM exited after being requested to terminate.
      STATUS | wrapper | 2017/10/17 18:28:50 | Launching a JVM...
      INFO | jvm 2 | 2017/10/17 18:28:50 | Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1G; support was removed in 8.0
      INFO | jvm 2 | 2017/10/17 18:28:50 | WrapperManager: Initializing...

       

       

            Unassigned Unassigned
            vgirardreydet Vincent Girard-Reydet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: