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

job-dsl-plugin depends on the deprecated fork of XStream

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • job-dsl-plugin
    • Jenkins 2.277.2, job-dsl-plugin 1.77

    Description

      The org.jvnet.hudson:xstream fork of XStream was removed from Jenkins in version 2.277 for JEP-228, see https://www.jenkins.io/doc/upgrade-guide/2.277/#xstream-update-jep-228

      job-dsl-plugin 1.77 (latest at time of writing) depends on the removed XStream, see https://github.com/jenkinsci/job-dsl-plugin/blob/job-dsl-1.77/build.gradle#L79

      My DSL project (which is hosted internally so I can't link to it) was unable to build with dependencies on org.jenkins-ci.plugins:job-dsl-core:1.77 and org.jenkins-ci.main:jenkins-war:2.277.2, however job-dsl-plugin is using XStream in a way that is compatible with upstream so this can be worked around by declaring the job-dsl-plugin dependency as:

      compile("org.jenkins-ci.plugins:job-dsl-core:1.77") {
        exclude module: 'xstream'
      }

      The error message was

      {{java.lang.VerifyError: (class: com/thoughtworks/xstream/core/util/SerializationMembers, method: getSerializablePersistentFields signature: (Ljava/lang/Class;)Ljava/util/Map Incompatible object argument for function call}}
        at hudson.util.RobustReflectionConverter.<init>(RobustReflectionConverter.java:106)}}
        at hudson.util.XStream2.setupConverters(XStream2.java:218)}}
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:574)}}
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:496)}}
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:465)}}
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:411)}}
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:378)}}
        at hudson.util.XStream2.<init>(XStream2.java:113)}}
        at jenkins.model.Jenkins.<clinit>(Jenkins.java:5439)}}
        at hudson.PluginManager.<clinit>(PluginManager.java:2227)}}
        at org.jvnet.hudson.test.JenkinsRule.<init>(JenkinsRule.java:336)}}
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)}}
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)}}

      Attachments

        Activity

          expephall Peter created issue -
          expephall Peter made changes -
          Field Original Value New Value
          Description The {{org.jvnet.hudson:xstream}} fork of XStream was removed from Jenkins in version 2.277 for JEP-228, see [https://www.jenkins.io/doc/upgrade-guide/2.277/#xstream-update-jep-228]

          job-dsl-plugin 1.77 (latest at time of writing) depends on the removed XStream, see [https://github.com/jenkinsci/job-dsl-plugin/blob/job-dsl-1.77/build.gradle#L79]

          My DSL project (which is hosted internally so I can't link to it) was unable to build with dependencies on {{org.jenkins-ci.plugins:job-dsl-core:1.77}} and {{org.jenkins-ci.main:jenkins-war:2.277.2}}, however job-dsl-plugin is using XStream in a way that is compatible with upstream so this can be worked around by declaring the job-dsl-plugin dependency as:

          compile({color:#067d17}"org.jenkins-ci.plugins:job-dsl-core:{color}{color:#067d17}{{1.77}}"{color}) {
            exclude {color:#067d17}module{color}: {color:#067d17}'xstream'
          {color}}


          The error message was

          {{java.lang.VerifyError: (class: com/thoughtworks/xstream/core/util/SerializationMembers, method: getSerializablePersistentFields signature: (Ljava/lang/Class;)Ljava/util/Map;) Incompatible object argument for function call}}
          {{ at hudson.util.RobustReflectionConverter.<init>(RobustReflectionConverter.java:106)}}
          {{ at hudson.util.XStream2.setupConverters(XStream2.java:218)}}
          {{ at com.thoughtworks.xstream.XStream.<init>(XStream.java:574)}}
          {{ at com.thoughtworks.xstream.XStream.<init>(XStream.java:496)}}
          {{ at com.thoughtworks.xstream.XStream.<init>(XStream.java:465)}}
          {{ at com.thoughtworks.xstream.XStream.<init>(XStream.java:411)}}
          {{ at com.thoughtworks.xstream.XStream.<init>(XStream.java:378)}}
          {{ at hudson.util.XStream2.<init>(XStream2.java:113)}}
          {{ at jenkins.model.Jenkins.<clinit>(Jenkins.java:5439)}}
          {{ at hudson.PluginManager.<clinit>(PluginManager.java:2227)}}
          {{ at org.jvnet.hudson.test.JenkinsRule.<init>(JenkinsRule.java:336)}}
          {{ at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)}}
          {{ at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)}}
          The {{org.jvnet.hudson:xstream}} fork of XStream was removed from Jenkins in version 2.277 for JEP-228, see [https://www.jenkins.io/doc/upgrade-guide/2.277/#xstream-update-jep-228]

          job-dsl-plugin 1.77 (latest at time of writing) depends on the removed XStream, see [https://github.com/jenkinsci/job-dsl-plugin/blob/job-dsl-1.77/build.gradle#L79]

          My DSL project (which is hosted internally so I can't link to it) was unable to build with dependencies on {{org.jenkins-ci.plugins:job-dsl-core:1.77}} and {{org.jenkins-ci.main:jenkins-war:2.277.2}}, however job-dsl-plugin is using XStream in a way that is compatible with upstream so this can be worked around by declaring the job-dsl-plugin dependency as:

          compile({color:#067d17}"org.jenkins-ci.plugins:job-dsl-core:{color}{color:#067d17}{{1.77}}"{color}) {
             exclude {color:#067d17}module{color}: 'xstream'
           }

          The error message was

          {{{{java.lang.VerifyError: (class: com/thoughtworks/xstream/core/util/SerializationMembers, method: getSerializablePersistentFields signature: (Ljava/lang/Class;)Ljava/util/Map;) Incompatible object argument for function call}}}}
          {{  at hudson.util.RobustReflectionConverter.<init>(RobustReflectionConverter.java:106)}}}}
          {{  at hudson.util.XStream2.setupConverters(XStream2.java:218)}}}}
          {{  at com.thoughtworks.xstream.XStream.<init>(XStream.java:574)}}}}
          {{  at com.thoughtworks.xstream.XStream.<init>(XStream.java:496)}}}}
          {{  at com.thoughtworks.xstream.XStream.<init>(XStream.java:465)}}}}
          {{  at com.thoughtworks.xstream.XStream.<init>(XStream.java:411)}}}}
          {{  at com.thoughtworks.xstream.XStream.<init>(XStream.java:378)}}}}
          {{  at hudson.util.XStream2.<init>(XStream2.java:113)}}}}
          {{  at jenkins.model.Jenkins.<clinit>(Jenkins.java:5439)}}}}
          {{  at hudson.PluginManager.<clinit>(PluginManager.java:2227)}}}}
          {{  at org.jvnet.hudson.test.JenkinsRule.<init>(JenkinsRule.java:336)}}}}
          {{  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)}}}}
          {{  at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)}}}}
          expephall Peter made changes -
          Summary Jenkins-dsl-plugin depends on the deprecated fork of XStream job-dsl-plugin depends on the deprecated fork of XStream
          jglick Jesse Glick made changes -
          Labels JEP-227 JEP-228 JEP-228
          jamietanna Jamie Tanna made changes -
          Assignee Daniel Spilker [ daspilker ] Jamie Tanna [ jamietanna ]

          People

            jamietanna Jamie Tanna
            expephall Peter
            Votes:
            8 Vote for this issue
            Watchers:
            14 Start watching this issue

            Dates

              Created:
              Updated: