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

          udob Udo Bellack added a comment -

          expephall Maybe the title should be "job-dsl-plugin depends on the deprecated fork of XStream"?

          udob Udo Bellack added a comment - expephall Maybe the title should be "job-dsl-plugin depends on the deprecated fork of XStream"?
          expephall Peter added a comment -

          udob Thanks for pointing that out, it's fixed now.

          expephall Peter added a comment - udob Thanks for pointing that out, it's fixed now.
          psimms_r7 Peter Simms added a comment - - edited

          I am still seeing this issue with using the below jobdsl + jenkins version in gradle tests

          jobDslVersion=1.78.3
          jenkinsVersion=2.319.3

          psimms_r7 Peter Simms added a comment - - edited I am still seeing this issue with using the below jobdsl + jenkins version in gradle tests jobDslVersion=1.78.3 jenkinsVersion=2.319.3
          reakaleek Jan Calanog added a comment -

          same issue with

          jobDslVersion=1.80
          jenkinsVersion=2.346.1

          reakaleek Jan Calanog added a comment - same issue with jobDslVersion=1.80 jenkinsVersion=2.346.1

          People

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

            Dates

              Created:
              Updated: