Executing the test suit for gradle-plugin against jenkins-core:2.107.2 to check compatibility, several of them are failing due to a Serialization exception. These errors seems to be related to JEP-200. As example, the following trace shows one of the exceptions:
       

      java.lang.RuntimeException: java.io.IOException: java.lang.RuntimeException: Failed to serialize hudson.model.Project#builders for class hudson.model.FreeStyleProject
      	at hudson.util.PersistedList._onModified(PersistedList.java:183)
      	at hudson.util.PersistedList.add(PersistedList.java:72)
      	at org.jvnet.hudson.test.JenkinsRule.configRoundtrip(JenkinsRule.java:1086)
      	at hudson.plugins.gradle.GradlePluginIntegrationTest.Config roundtrip(GradlePluginIntegrationTest.groovy:180)
      Caused by: java.io.IOException: java.lang.RuntimeException: Failed to serialize hudson.model.Project#builders for class hudson.model.FreeStyleProject
      	at hudson.XmlFile.write(XmlFile.java:201)
      	at hudson.model.AbstractItem.save(AbstractItem.java:483)
      	at hudson.model.Job.save(Job.java:196)
      	at hudson.model.AbstractProject.save(AbstractProject.java:289)
      	at hudson.util.PersistedList.onModified(PersistedList.java:173)
      	at hudson.util.PersistedList._onModified(PersistedList.java:181)
      	... 3 more
      Caused by: java.lang.RuntimeException: Failed to serialize hudson.model.Project#builders for class hudson.model.FreeStyleProject
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:256)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
      	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
      	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
      	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
      	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
      	at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
      	at hudson.XmlFile.write(XmlFile.java:194)
      	... 8 more
      Caused by: java.lang.UnsupportedOperationException: Refusing to marshal hudson.plugins.gradle.Gradle for security reasons; see https://jenkins.io/redirect/class-filter/
      	at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:530)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
      	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
      	at hudson.util.DescribableList$ConverterImpl.marshal(DescribableList.java:269)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
      	... 21 more
      

          [JENKINS-51062] JEP-200 issue with plugin Gradle Plugin

          Francisco Fernández created issue -
          Francisco Fernández made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          After analysing all the exceptions, the classes that seem to be affected are:

          • hudson.plugins.gradle.BuildScanAction
          • hudson.plugins.gradle.Gradle
          • hudson.plugins.gradle.Gradle$DescriptorImpl
          • hudson.plugins.gradle.GradleInstallation
          • hudson.plugins.gradle.GradleInstallation$DescriptorImpl
          • hudson.plugins.gradle.GradleInstaller

          All of them seems to be fine since their non transient field are String, so probably the fix could be just adding those class to the whitelist (via hudson.remoting.ClassFilter file).

          Francisco Fernández added a comment - After analysing all the exceptions, the classes that seem to be affected are: hudson.plugins.gradle.BuildScanAction hudson.plugins.gradle.Gradle hudson.plugins.gradle.Gradle$DescriptorImpl hudson.plugins.gradle.GradleInstallation hudson.plugins.gradle.GradleInstallation$DescriptorImpl hudson.plugins.gradle.GradleInstaller All of them seems to be fine since their non transient field are String, so probably the fix could be just adding those class to the whitelist (via hudson.remoting.ClassFilter file).
          Francisco Fernández made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Francisco Fernández made changes -
          Remote Link New: This issue links to "PR-55 (Web Link)" [ 20605 ]
          Oleg Nenashev made changes -
          Labels Original: JEP-200 New: JEP-200 JEP-200-invalid

          Oleg Nenashev added a comment -

          As discussed, it is likely an issue with development tools (obsolete JTH, etc.). The issue cannot be reproduced on a real instance

          Oleg Nenashev added a comment - As discussed, it is likely an issue with development tools (obsolete JTH, etc.). The issue cannot be reproduced on a real instance
          James Dumay made changes -
          Remote Link New: This issue links to "CloudBees Internal CJP-8740 (Web Link)" [ 20614 ]
          Jesse Glick made changes -
          Assignee Original: Francisco Fernández [ fcojfernandez ] New: Jesse Glick [ jglick ]
          Jesse Glick made changes -
          Status Original: In Review [ 10005 ] New: In Progress [ 3 ]

            jglick Jesse Glick
            fcojfernandez Francisco Fernández
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: