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

UnsupportedOperationException during checkout

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins 2.280
      gerrit-cdoe-review- plugin 0.4.4

      This simple pipeline fails:

      node {
          echo "test"
      }
      

      The stacktrace is as follows:

      ERROR: Checkout failed
      java.lang.UnsupportedOperationException: Refusing to marshal com.google.gerrit.extensions.common.ChangeInfo for security reasons; see https://jenkins.io/redirect/class-filter/
      	at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:540)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:275)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:262)
      Caused: java.lang.RuntimeException: Failed to serialize java.util.Optional#value for class java.util.Optional
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:266)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:233)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:150)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:219)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:158)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:275)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:262)
      Caused: java.lang.RuntimeException: Failed to serialize jenkins.plugins.gerrit.GerritEnvironmentContributor$ChangeInfoInvisibleAction#maybeChangeInfo for class jenkins.plugins.gerrit.GerritEnvironmentContributor$ChangeInfoInvisibleAction
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:266)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:233)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:150)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:219)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:158)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	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: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:74)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:275)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:262)
      Caused: java.lang.RuntimeException: Failed to serialize hudson.model.Actionable#actions for class org.jenkinsci.plugins.workflow.job.WorkflowRun
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:266)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:233)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:150)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:219)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:158)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	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:1255)
      	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1244)
      	at com.thoughtworks.xstream.XStream.toXML(XStream.java:1217)
      	at hudson.XmlFile.write(XmlFile.java:195)
      Caused: java.io.IOException
      	at hudson.XmlFile.write(XmlFile.java:202)
      	at org.jenkinsci.plugins.workflow.support.PipelineIOUtils.writeByXStream(PipelineIOUtils.java:30)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.save(WorkflowRun.java:1210)
      	at hudson.util.PersistedList.onModified(PersistedList.java:182)
      	at hudson.util.PersistedList._onModified(PersistedList.java:212)
      Caused: java.lang.RuntimeException
      	at hudson.util.PersistedList._onModified(PersistedList.java:214)
      	at hudson.util.PersistedList.add(PersistedList.java:80)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:879)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1000(WorkflowRun.java:137)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1168)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:150)
      	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:154)
      	at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:142)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      
      

       

      This seems to be related with the introduction of [JEP-200](https://www.jenkins.io/blog/2018/03/15/jep-200-lts/)

            tdraebing Thomas Draebing
            tdraebing Thomas Draebing
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: