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

[JDK 9] Pipeline fails immediately - ASM illegal argument exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • pipeline
    • 2.60.2

      When using latest Jenkins (either LTS or weekly) and creating and running a Pipeline with JDK9, you get the following stack trace:

      Démarré par l'utilisateur admin@admin
      java.lang.IllegalArgumentException
      	at org.kohsuke.asm5.ClassReader.<init>(ClassReader.java:170)
      	at org.kohsuke.asm5.ClassReader.<init>(ClassReader.java:153)
      	at org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.reader(ClassLoadingReferenceTypeHierachyReader.java:64)
      	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:843)
      	at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1311)
      	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1364)
      	at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1327)
      	at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1080)
      	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
      	at org.jenkinsci.plugins.workflow.cps.CpsScript.<init>(CpsScript.java:69)
      	at WorkflowScript.<init>(WorkflowScript)
      	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
      	at java.base/java.lang.Class.newInstance(Class.java:558)
      	at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:434)
      Caused: groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class WorkflowScript. Reason
      	at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:466)
      	at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
      	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:129)
      	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:123)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:516)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:479)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:269)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:419)
      Finished: FAILURE
      

      We'll need a new version of asm that includes JDK 9 support

            oleg_nenashev Oleg Nenashev
            batmat Baptiste Mathus
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: