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

Refusing to marshal com.google.gerrit.extensions.common.ReviewerUpdateInfo

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • Gerrit Code Review plugin Version 0.4.7
      Jenkins 2.346.1
    • 0.4.8

      Hi there.
      I captured an issue according to JEP-200 using Multibranch Pipeline with Gerrit-Code-Review.
      I can apply a workaround, but I would like it if the maintainer can resolve the issue for safety reasons.

      Log:

      17:04:02 Running on host01 in /home/jenkins/workspace/Playground_aaaa_81_82381_2@6
      17:04:02 java.lang.UnsupportedOperationException: Refusing to marshal com.google.gerrit.extensions.common.ReviewerUpdateInfo for security reasons; see https://www.jenkins.io/redirect/class-filter/
      17:04:02 at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:581)
      17:04:02 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      17:04:02 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      17:04:02 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
      17:04:02 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87)
      17:04:02 at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeBareItem(AbstractCollectionConverter.java:94)
      17:04:02 at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:66)
      17:04:02 at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeCompleteItem(AbstractCollectionConverter.java:81)
      17:04:02 at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:75)
      17:04:02 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      17:04:02 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      17:04:02 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
      17:04:02 at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283)
      17:04:02 at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270)
      17:04:02 Caused: java.lang.RuntimeException: Failed to serialize com.google.gerrit.extensions.common.ChangeInfo#reviewerUpdates for class com.google.gerrit.extensions.common.ChangeInfo
      17:04:02 at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274)
      17:04:02 at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
      17:04:02 at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
      17:04:02 at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
      17:04:02 at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      17:04:02 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      17:04:02 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      17:04:02 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
      17:04:02 at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283)
      17:04:02 at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270)
      17:04:02 Caused: java.lang.RuntimeException: Failed to serialize java.util.Optional#value for class java.util.Optional
      17:04:02 at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274)
      17:04:02 at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
      17:04:02 at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
      17:04:02 at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
      17:04:02 at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      17:04:02 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      17:04:02 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      17:04:02 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
      17:04:02 at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283)
      17:04:02 at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270)
      17:04:02 Caused: java.lang.RuntimeException: Failed to serialize jenkins.plugins.gerrit.GerritEnvironmentContributor$ChangeInfoInvisibleAction#maybeChangeInfo for class jenkins.plugins.gerrit.GerritEnvironmentContributor$ChangeInfoInvisibleAction
      17:04:02 at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274)
      17:04:02 at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
      17:04:02 at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
      17:04:02 at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
      17:04:02 at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      17:04:02 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      17:04:02 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      17:04:02 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
      17:04:02 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87)
      17:04:02 at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeBareItem(AbstractCollectionConverter.java:94)
      17:04:02 at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:66)
      17:04:02 at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeCompleteItem(AbstractCollectionConverter.java:81)
      17:04:02 at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:75)
      17:04:02 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      17:04:02 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      17:04:02 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
      17:04:02 at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283)
      17:04:02 at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270)
      17:04:02 Caused: java.lang.RuntimeException: Failed to serialize hudson.model.Actionable#actions for class org.jenkinsci.plugins.workflow.job.WorkflowRun
      17:04:02 at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274)
      17:04:02 at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
      17:04:02 at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
      17:04:02 at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
      17:04:02 at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      17:04:02 at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      17:04:02 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      17:04:02 at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
      17:04:02 at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:83)
      17:04:02 at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
      17:04:02 at com.thoughtworks.xstream.XStream.marshal(XStream.java:1266)
      17:04:02 at com.thoughtworks.xstream.XStream.marshal(XStream.java:1255)
      17:04:02 at com.thoughtworks.xstream.XStream.toXML(XStream.java:1228)
      17:04:02 at hudson.util.XStream2.toXMLUTF8(XStream2.java:345)
      17:04:02 at org.jenkinsci.plugins.workflow.support.PipelineIOUtils.writeByXStream(PipelineIOUtils.java:34)
      17:04:02 at org.jenkinsci.plugins.workflow.job.WorkflowRun.save(WorkflowRun.java:1228)
      17:04:02 at hudson.BulkChange.commit(BulkChange.java:98)
      17:04:02 at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1472)
      17:04:02 at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:509)
      17:04:02 at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:38)
      17:04:02 at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
      17:04:02 at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      17:04:02 at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
      17:04:02 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      17:04:02 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      17:04:02 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      17:04:02 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      17:04:02 at java.base/java.lang.Thread.run(Thread.java:829)
      17:04:02 Finished: FAILURE

          [JENKINS-68879] Refusing to marshal com.google.gerrit.extensions.common.ReviewerUpdateInfo

          mario doman added a comment -

          Hello... I have the same issue with gerrit-code-review-plugin. Is there any date when this issue will be resolved ?

          Jenkins version Jenkins 2.346.1

           
          java.lang.UnsupportedOperationException: Refusing to marshal com.google.gerrit.extensions.common.ReviewerUpdateInfo for security reasons; see
          https://www.jenkins.io/redirect/class-filter/
          at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:581)
          at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
          at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
          at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
          at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87)
          at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeBareItem(AbstractCollectionConverter.java:94)
          at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:66)
          at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeCompleteItem(AbstractCollectionConverter.java:81)
          at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:75)
          at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
          at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
          at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
          at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283)
          at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270)

          mario doman added a comment - Hello... I have the same issue with gerrit-code-review-plugin . Is there any date when this issue will be resolved ? Jenkins version Jenkins 2.346.1   java.lang.UnsupportedOperationException: Refusing to marshal com.google.gerrit.extensions.common.ReviewerUpdateInfo for security reasons; see https://www.jenkins.io/redirect/class-filter/ at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:581) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeBareItem(AbstractCollectionConverter.java:94) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:66) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeCompleteItem(AbstractCollectionConverter.java:81) at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:75) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270)

          Anil Belur added a comment -

          Anyone else who is trying to figure out what the workaround is to this issue: Append the following line to JAVA_OPTS and restart the Jenkins service.

           
          -Dhudson.remoting.ClassFilter=com.google.gerrit.extensions.common.AvatarInfo,com.google.gerrit.extensions.common.ReviewerUpdateInfo,com.google.gerrit.extensions.common.TrackingIdInfo"

          Anil Belur added a comment - Anyone else who is trying to figure out what the workaround is to this issue: Append the following line to JAVA_OPTS and restart the Jenkins service.   -Dhudson.remoting.ClassFilter=com.google.gerrit.extensions.common.AvatarInfo,com.google.gerrit.extensions.common.ReviewerUpdateInfo,com.google.gerrit.extensions.common.TrackingIdInfo"

          I did an update of all plugins yesterday (on 2.346.1) and something completely broke gerrit-code-review-plugin with this exact error message.

          I already had the workaround which didn't help at all, since it complained about another class. Adding this class as well just caused the error message to name yet another class. I ended up adding all of the com.google.gerrit.extensions.common.* classes to the class filter and it finally started.

          Surely this can't be the intended behaviour? Having to add 50 or so individual class names, one after another, while restarting Jenkins and retriggering a build in between, is a tedious and time-consuming process. Trust me. It's not pleasant.

          Andreas Fritiofson added a comment - I did an update of all plugins yesterday (on 2.346.1) and something completely broke gerrit-code-review-plugin with this exact error message. I already had the workaround which didn't help at all, since it complained about another class. Adding this class as well just caused the error message to name yet another class. I ended up adding all of the com.google.gerrit.extensions.common.* classes to the class filter and it finally started. Surely this can't be the intended behaviour? Having to add 50 or so individual class names, one after another, while restarting Jenkins and retriggering a build in between, is a tedious and time-consuming process. Trust me. It's not pleasant.

          Josef added a comment -

          Same for me. I had to add all com.google.gerrit.extensions.common.* classes to get it working

          Josef added a comment - Same for me. I had to add all com.google.gerrit.extensions.common.* classes to get it working

          Found this change where a proper implementation being discussed: https://review.gerrithub.io/c/jenkinsci/gerrit-code-review-plugin/+/525795/1
          lucamilanesio maybe you can help getting this done and released? Thanks

          Vivien Tintillier added a comment - Found this change where a proper implementation being discussed: https://review.gerrithub.io/c/jenkinsci/gerrit-code-review-plugin/+/525795/1 lucamilanesio maybe you can help getting this done and released? Thanks

          Luca Domenico Milanesio added a comment - This is now fixed with https://review.gerrithub.io/c/jenkinsci/gerrit-code-review-plugin/+/556037 and released as v0.4.8.

            lucamilanesio Luca Domenico Milanesio
            johnroe john Roe
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: