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

Plugin Jelly/Stapler does not work with JDK 11.

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • gradle-jpi-plugin
    • None
    • OpenJDK 11, Jenkins core 2.173, JPI 0.31.0

      We are building a Jenkins Cloud plugin using JPI for Java 11. Stapler is failing to create the Cloud at ClassReader:170. It seems that org.kohsuke.asm5 is not working with Java 11. From what I understood it should use org.kohsuke.asm6 anyways. ./gradlew dependencies shows that JPI pulled in both, asm5 and asm6. Is this a bug in JPI or should is the configuration just wrong?

       

      See my pull request for details.

          [JENKINS-57024] Plugin Jelly/Stapler does not work with JDK 11.

          Steve Hill added a comment -

          Thanks for trying out java 11 support jeschkies!

          It looks like Stapler will need to be updated. Perhaps it's worth opening an issue on stapler and tagging the java 11 team.

          The issue linked in the PR (JENKINS-46602) did result in upgrading org.jenkins-ci:bytecode-compatibility-transformer:1.8 -> 2.0-alpha-3 for org.jenkins-ci.main:jenkins-core. This can be verified with the dependencyInsight task on your PR's branch:

          $ ./gradlew -q dependencyInsight --configuration runtimeClasspath --dependency asm6
          org.kohsuke:asm6:6.2
             variant "runtime" [
                org.gradle.status             = release (not requested)
                org.gradle.usage              = java-runtime
                org.gradle.component.category = library (not requested)
             ]
          
          org.kohsuke:asm6:6.2
          \--- org.jenkins-ci:bytecode-compatibility-transformer:2.0-beta-2
               \--- org.jenkins-ci.main:jenkins-core:2.173
                    \--- runtimeClasspath
          

          Unfortunately stapler has not been updated yet. By searching for asm5, we can see that stapler has declared a dependency on this:

          $ ./gradlew -q dependencyInsight --configuration runtimeClasspath --dependency asm5
          org.kohsuke:asm5:5.0.1
             variant "runtime" [
                org.gradle.status             = release (not requested)
                org.gradle.usage              = java-runtime
                org.gradle.component.category = library (not requested)
             ]
          
          org.kohsuke:asm5:5.0.1
          \--- org.kohsuke.stapler:stapler:1.257
               +--- org.kohsuke.stapler:stapler-jrebel:1.257
               |    \--- org.jenkins-ci.main:jenkins-core:2.173
               |         \--- runtimeClasspath
               +--- org.kohsuke.stapler:stapler-adjunct-zeroclipboard:1.3.5-1 (requested org.kohsuke.stapler:stapler:1.140)
               |    \--- org.jenkins-ci.main:jenkins-core:2.173 (*)
               +--- org.kohsuke.stapler:stapler-adjunct-timeline:1.5 (requested org.kohsuke.stapler:stapler:1.140)
               |    \--- org.jenkins-ci.main:jenkins-core:2.173 (*)
               +--- org.kohsuke.stapler:stapler-adjunct-codemirror:1.3 (requested org.kohsuke.stapler:stapler:1.140)
               |    \--- org.jenkins-ci.main:jenkins-core:2.173 (*)
               \--- org.kohsuke.stapler:stapler-jelly:1.257
                    \--- org.kohsuke.stapler:stapler-groovy:1.257
                         \--- org.jenkins-ci.main:jenkins-core:2.173 (*)
          
          (*) - dependencies omitted (listed previously)
          

          It is declared as a first-order dependency in Stapler's POM.

          Steve Hill added a comment - Thanks for trying out java 11 support jeschkies ! It looks like Stapler will need to be updated. Perhaps it's worth opening an issue on stapler and tagging the java 11 team . The issue linked in the PR ( JENKINS-46602 ) did result in upgrading org.jenkins-ci:bytecode-compatibility-transformer:1.8 -> 2.0-alpha-3 for org.jenkins-ci.main:jenkins-core . This can be verified with the dependencyInsight task on your PR's branch: $ ./gradlew -q dependencyInsight --configuration runtimeClasspath --dependency asm6 org.kohsuke:asm6:6.2 variant "runtime" [ org.gradle.status = release (not requested) org.gradle.usage = java-runtime org.gradle.component.category = library (not requested) ] org.kohsuke:asm6:6.2 \--- org.jenkins-ci:bytecode-compatibility-transformer:2.0-beta-2 \--- org.jenkins-ci.main:jenkins-core:2.173 \--- runtimeClasspath Unfortunately stapler has not been updated yet. By searching for asm5, we can see that stapler has declared a dependency on this: $ ./gradlew -q dependencyInsight --configuration runtimeClasspath --dependency asm5 org.kohsuke:asm5:5.0.1 variant "runtime" [ org.gradle.status = release (not requested) org.gradle.usage = java-runtime org.gradle.component.category = library (not requested) ] org.kohsuke:asm5:5.0.1 \--- org.kohsuke.stapler:stapler:1.257 +--- org.kohsuke.stapler:stapler-jrebel:1.257 | \--- org.jenkins-ci.main:jenkins-core:2.173 | \--- runtimeClasspath +--- org.kohsuke.stapler:stapler-adjunct-zeroclipboard:1.3.5-1 (requested org.kohsuke.stapler:stapler:1.140) | \--- org.jenkins-ci.main:jenkins-core:2.173 (*) +--- org.kohsuke.stapler:stapler-adjunct-timeline:1.5 (requested org.kohsuke.stapler:stapler:1.140) | \--- org.jenkins-ci.main:jenkins-core:2.173 (*) +--- org.kohsuke.stapler:stapler-adjunct-codemirror:1.3 (requested org.kohsuke.stapler:stapler:1.140) | \--- org.jenkins-ci.main:jenkins-core:2.173 (*) \--- org.kohsuke.stapler:stapler-jelly:1.257 \--- org.kohsuke.stapler:stapler-groovy:1.257 \--- org.jenkins-ci.main:jenkins-core:2.173 (*) (*) - dependencies omitted (listed previously) It is declared as a first-order dependency in Stapler's POM .

          Steve Hill added a comment -

          Closing this issue as not a defect with the gradle-jpi-plugin. The unwanted org.kohsuke:asm5 is declared as a first-order dependency on org.kohsuke.stapler:stapler.

          Steve Hill added a comment - Closing this issue as not a defect with the gradle-jpi-plugin. The unwanted org.kohsuke:asm5  is declared as a first-order dependency on org.kohsuke.stapler:stapler.

            sghill Steve Hill
            jeschkies Karsten Jeschkies
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: