groovy.lang.GroovyRuntimeException: Failed to create Script instance <span class="code-keyword" style="color: #000091">for</span> class: class WorkflowScript. Reason: java.lang.RuntimeException: java.lang.ClassNotFoundException: java.io.Serializable

Google Groups | gaiz...@gmail.com (JIRA) | 3 months ago
  1. 0

    Hey, when i run a pipeline script (doesnt matter what script do I write), it fails. OS: ubuntu16.04 Jenkins version: 2.7.4 error: {code:java} groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class WorkflowScript. Reason: java.lang.RuntimeException: java.lang.ClassNotFoundException: java.io.Serializable at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:464) at groovy.lang.GroovyShell.parse(GroovyShell.java:700) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:67) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:410) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:373) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:213) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: java.io.Serializable at org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.reader(ClassLoadingReferenceTypeHierachyReader.java:61) at org.jenkinsci.bytecode.helper.TypeHierarchyReader.hierarchyOf(TypeHierarchyReader.java:176) at org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.hierarchyOf(ClassLoadingReferenceTypeHierachyReader.java:39) at org.jenkinsci.bytecode.helper.TypeHierarchyReader$TypeHierarchy.isAssignableFrom(TypeHierarchyReader.java:321) at org.jenkinsci.bytecode.helper.TypeHierarchyReader$TypeHierarchy.isAssignableFromAnyInterfaceImplementedBy(TypeHierarchyReader.java:329) at org.jenkinsci.bytecode.helper.TypeHierarchyReader$TypeHierarchy.isAssignableFrom(TypeHierarchyReader.java:310) at org.jenkinsci.bytecode.helper.TypeHierarchyReader.isAssignableFrom(TypeHierarchyReader.java:124) at org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.isAssignableFrom(ClassLoadingReferenceTypeHierachyReader.java:39) at org.jenkinsci.bytecode.helper.TypeHierarchyReader.getCommonSuperClass(TypeHierarchyReader.java:131) at org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.getCommonSuperClass(ClassLoadingReferenceTypeHierachyReader.java:39) at org.jenkinsci.bytecode.NonClassLoadingClassWriter.getCommonSuperClass(NonClassLoadingClassWriter.java:72) at org.kohsuke.asm5.ClassWriter.getMergedType(ClassWriter.java:1654) at org.kohsuke.asm5.Frame.merge(Frame.java:1426) at org.kohsuke.asm5.Frame.merge(Frame.java:1374) at org.kohsuke.asm5.MethodWriter.visitMaxs(MethodWriter.java:1475) at org.kohsuke.asm5.tree.MethodNode.accept(MethodNode.java:833) at org.kohsuke.asm5.commons.JSRInlinerAdapter.visitEnd(JSRInlinerAdapter.java:187) at org.jenkinsci.bytecode.Transformer$1$1.visitEnd(Transformer.java:109) at org.kohsuke.asm5.MethodVisitor.visitEnd(MethodVisitor.java:877) at org.kohsuke.asm5.ClassReader.readMethod(ClassReader.java:1021) at org.kohsuke.asm5.ClassReader.accept(ClassReader.java:693) at org.kohsuke.asm5.ClassReader.accept(ClassReader.java:506) at org.jenkinsci.bytecode.Transformer.transform(Transformer.java:115) at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:883) at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310) at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1366) at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326) at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079) at java.lang.ClassLoader.loadClass(java.base@9-internal/ClassLoader.java:419) at org.jenkinsci.plugins.workflow.cps.CpsScript.<init>(CpsScript.java:71) at WorkflowScript.<init>(WorkflowScript) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(java.base@9-internal/Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(java.base@9-internal/NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(java.base@9-internal/DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(java.base@9-internal/Constructor.java:453) at java.lang.Class.newInstance(java.base@9-internal/Class.java:550) at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:432) ... 7 more Finished: FAILURE {code}

    Jenkins JIRA | 3 months ago | or gaizer
    groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class WorkflowScript. Reason: java.lang.RuntimeException: java.lang.ClassNotFoundException: java.io.Serializable
  2. 0

    [JIRA] (JENKINS-38303) pipeline script fails

    Google Groups | 3 months ago | gaiz...@gmail.com (JIRA)
    groovy.lang.GroovyRuntimeException: Failed to create Script instance <span class="code-keyword" style="color: #000091">for</span> class: class WorkflowScript. Reason: java.lang.RuntimeException: java.lang.ClassNotFoundException: java.io.Serializable
  3. 0

    Failed to deserialize SerializerPojo

    GitHub | 3 years ago | jrumbinas
    java.lang.RuntimeException: java.lang.ClassNotFoundException: �
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error stating OIM Server

    Oracle Community | 5 years ago | 906723
    java.lang.RuntimeException: java.lang.ClassNotFoundException
  6. 0

    OIM 11G Startup error

    Oracle Community | 5 years ago | 761980
    java.lang.RuntimeException: java.lang.ClassNotFoundException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      java.lang.ClassNotFoundException: java.io.Serializable

      at org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.reader()
    2. org.jenkinsci.bytecode
      NonClassLoadingClassWriter.getCommonSuperClass
      1. org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.reader(ClassLoadingReferenceTypeHierachyReader.java:61)
      2. org.jenkinsci.bytecode.helper.TypeHierarchyReader.hierarchyOf(TypeHierarchyReader.java:176)
      3. org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.hierarchyOf(ClassLoadingReferenceTypeHierachyReader.java:39)
      4. org.jenkinsci.bytecode.helper.TypeHierarchyReader$TypeHierarchy.isAssignableFrom(TypeHierarchyReader.java:321)
      5. org.jenkinsci.bytecode.helper.TypeHierarchyReader$TypeHierarchy.isAssignableFromAnyInterfaceImplementedBy(TypeHierarchyReader.java:329)
      6. org.jenkinsci.bytecode.helper.TypeHierarchyReader$TypeHierarchy.isAssignableFrom(TypeHierarchyReader.java:310)
      7. org.jenkinsci.bytecode.helper.TypeHierarchyReader.isAssignableFrom(TypeHierarchyReader.java:124)
      8. org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.isAssignableFrom(ClassLoadingReferenceTypeHierachyReader.java:39)
      9. org.jenkinsci.bytecode.helper.TypeHierarchyReader.getCommonSuperClass(TypeHierarchyReader.java:131)
      10. org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.getCommonSuperClass(ClassLoadingReferenceTypeHierachyReader.java:39)
      11. org.jenkinsci.bytecode.NonClassLoadingClassWriter.getCommonSuperClass(NonClassLoadingClassWriter.java:72)
      11 frames
    3. asm5
      JSRInlinerAdapter.visitEnd
      1. org.kohsuke.asm5.ClassWriter.getMergedType(ClassWriter.java:1654)
      2. org.kohsuke.asm5.Frame.merge(Frame.java:1426)
      3. org.kohsuke.asm5.Frame.merge(Frame.java:1374)
      4. org.kohsuke.asm5.MethodWriter.visitMaxs(MethodWriter.java:1475)
      5. org.kohsuke.asm5.tree.MethodNode.accept(MethodNode.java:833)
      6. org.kohsuke.asm5.commons.JSRInlinerAdapter.visitEnd(JSRInlinerAdapter.java:187)
      6 frames
    4. org.jenkinsci.bytecode
      Transformer$1$1.visitEnd
      1. org.jenkinsci.bytecode.Transformer$1$1.visitEnd(Transformer.java:109)
      1 frame
    5. asm5
      ClassReader.accept
      1. org.kohsuke.asm5.MethodVisitor.visitEnd(MethodVisitor.java:877)
      2. org.kohsuke.asm5.ClassReader.readMethod(ClassReader.java:1021)
      3. org.kohsuke.asm5.ClassReader.accept(ClassReader.java:693)
      4. org.kohsuke.asm5.ClassReader.accept(ClassReader.java:506)
      4 frames
    6. org.jenkinsci.bytecode
      Transformer.transform
      1. org.jenkinsci.bytecode.Transformer.transform(Transformer.java:115)
      1 frame
    7. Hudson
      ClassicPluginStrategy$AntClassLoader2.defineClassFromData
      1. hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:883)
      1 frame
    8. jenkins.util
      AntClassLoader.loadClass
      1. jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
      2. jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1366)
      3. jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
      4. jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
      4 frames