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

UnsupportedOperationException: Refusing to marshal com.sonymobile.tools.gerrit.gerritevents.watchdog.WatchTimeExceptionData for security reasons

      After upgrading jenkins and updating the gerrit trigger plugin, it couldn't read the gerrit-trigger.xml file so I deleted it. Now when I try to add a new server under gerrit trigger or try to edit existing server, when I save it throws an exception:

      Caused by: java.lang.UnsupportedOperationException: Refusing to marshal com.sonymobile.tools.gerrit.gerritevents.watchdog.WatchTimeExceptionData 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.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
          at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
          at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)

      So following what is written on https://jenkins.io/redirect/class-filter/ I am reporting this issue. Note that after doing save a few times, little by little it saved all the needed values even though this exception continues to occur.

          [JENKINS-48963] UnsupportedOperationException: Refusing to marshal com.sonymobile.tools.gerrit.gerritevents.watchdog.WatchTimeExceptionData for security reasons

          Marc des Garets created issue -
          Marc des Garets made changes -
          Link New: This issue is related to JENKINS-47736 [ JENKINS-47736 ]
          Marc des Garets made changes -
          Description Original: After upgrading jenkins and updating the gerrit trigger plugin, it couldn't read the gerrit-trigger.xml file so I deleted it. Now when I try to add a new server under gerrit trigger or try to edit existing server, when I save it throws an exception:

          Caused by: java.lang.UnsupportedOperationException: Refusing to marshal com.sonymobile.tools.gerrit.gerritevents.watchdog.WatchTimeExceptionData 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.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)

          So following what is written on [https://jenkins.io/redirect/class-filter/] I am reporting this issue. Is there a way to bypass this for the time being?
          New: After upgrading jenkins and updating the gerrit trigger plugin, it couldn't read the gerrit-trigger.xml file so I deleted it. Now when I try to add a new server under gerrit trigger or try to edit existing server, when I save it throws an exception:

          Caused by: java.lang.UnsupportedOperationException: Refusing to marshal com.sonymobile.tools.gerrit.gerritevents.watchdog.WatchTimeExceptionData 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.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
               at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
               at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)

          So following what is written on [https://jenkins.io/redirect/class-filter/] I am reporting this issue. Note that after doing save a few times, little by little it saved all the needed values.
          Marc des Garets made changes -
          Description Original: After upgrading jenkins and updating the gerrit trigger plugin, it couldn't read the gerrit-trigger.xml file so I deleted it. Now when I try to add a new server under gerrit trigger or try to edit existing server, when I save it throws an exception:

          Caused by: java.lang.UnsupportedOperationException: Refusing to marshal com.sonymobile.tools.gerrit.gerritevents.watchdog.WatchTimeExceptionData 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.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
               at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
               at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)

          So following what is written on [https://jenkins.io/redirect/class-filter/] I am reporting this issue. Note that after doing save a few times, little by little it saved all the needed values.
          New: After upgrading jenkins and updating the gerrit trigger plugin, it couldn't read the gerrit-trigger.xml file so I deleted it. Now when I try to add a new server under gerrit trigger or try to edit existing server, when I save it throws an exception:

          Caused by: java.lang.UnsupportedOperationException: Refusing to marshal com.sonymobile.tools.gerrit.gerritevents.watchdog.WatchTimeExceptionData 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.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
               at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
               at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)

          So following what is written on [https://jenkins.io/redirect/class-filter/] I am reporting this issue. Note that after doing save a few times, little by little it saved all the needed values even though this exception continues to occur.

          Oleg Nenashev added a comment -

          ttux Are you sure you are using Gerrit Trigger 2.27.2? Full Stacktrace would be helpful.

          Oleg Nenashev added a comment - ttux Are you sure you are using Gerrit Trigger 2.27.2? Full Stacktrace would be helpful.
          Oleg Nenashev made changes -
          Link New: This issue is related to JENKINS-48943 [ JENKINS-48943 ]
          Oleg Nenashev made changes -
          Assignee Original: Luca Domenico Milanesio [ lucamilanesio ] New: Oleg Nenashev [ oleg_nenashev ]

          Oleg Nenashev added a comment -

          i confirm that the class is in the patched library: https://github.com/sonyxperiadev/gerrit-events/blob/master/src/main/java/com/sonymobile/tools/gerrit/gerritevents/watchdog/WatchTimeExceptionData.java
          If the plugin is up to date, there is a chance it conflicts with another lib with PluginFirstClassloader

          Oleg Nenashev added a comment - i confirm that the class is in the patched library: https://github.com/sonyxperiadev/gerrit-events/blob/master/src/main/java/com/sonymobile/tools/gerrit/gerritevents/watchdog/WatchTimeExceptionData.java If the plugin is up to date, there is a chance it conflicts with another lib with PluginFirstClassloader
          Marc des Garets made changes -
          Attachment New: Screenshot from 2018-01-16 16-15-10.png [ 41137 ]

          Oleg Nenashev added a comment -

          ttux the screenshot says you're using 2.27.1, not 2.27.2

          Oleg Nenashev added a comment - ttux the screenshot says you're using 2.27.1, not 2.27.2

            oleg_nenashev Oleg Nenashev
            ttux Marc des Garets
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: