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

JEP-200: UnsupportedOperationException: Refusing to marshal net.sf.json.JSONObject for security reasons

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • consul-plugin
    • Jenkins 2.107+

      Persisting the global consul plugin configuration to disk isn't working.

      Looks to be broken by[ https://github.com/jenkinsci/jep/blob/master/jep/200/README.adoc|JEP-200: Switch Remoting/XStream blacklist to a whitelist].

      Jenkins server log:

      WARNING Failed to save /var/jenkins_home/com.inneractive.jenkins.plugins.consul.configurations.ConsulGlobalConfigurations.xml
      java.io.IOException: java.lang.RuntimeException: Failed to serialize com.inneractive.jenkins.plugins.consul.configurations.ConsulGlobalConfigurations$DescriptorImpl#configurationsList for class com.inneractive.jenkins.plugins.consul.configurations.ConsulGlobalConfigurations$DescriptorImpl
      ...
      Caused by: java.lang.UnsupportedOperationException: Refusing to marshal net.sf.json.JSONObject for security reasons; see https://jenkins.io/redirect/class-filter/
      at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:543)
      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)
      ... 107 more

            liozn lioz nudel
            entelo_ops Fred Vogt
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: