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

Groovy PostBuild plugin is not compatible with JEP-200

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      As reported by Mark Waite in https://groups.google.com/forum/#!topic/jenkinsci-dev/EALjDtS4riU

      ConversionException: Refusing to unmarshal textBuilder for security reasons; see https://jenkins.io/redirect/class-filter/ 
      ---- Debugging information ---- 
      class : java.lang.StringBuilder 
      required-type : java.lang.StringBuilder 
      converter-type : hudson.util.XStream2$BlacklistedTypesConverter 
      path : /flow-build/actions/org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildSummaryAction/textBuilder 
      line number : 120 
      -------------------------------
      

      It happens because the plugin serializes StringBuilder to the disk in the action.

      The system log includes the following information:

      Jan 13, 2018 5:00:30 AM org.jenkinsci.plugins.workflow.cps.CpsFlowExecution notifyListeners
      WARNING: null
      java.io.IOException: java.lang.RuntimeException: Failed to serialize hudson.model.Actionable#actions for class org.jenkinsci.plugins.workflow.job.WorkflowRun
              at hudson.XmlFile.write(XmlFile.java:201)
              at org.jenkinsci.plugins.workflow.support.PipelineIOUtils.writeByXStream(PipelineIOUtils.java:30)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun.save(WorkflowRun.java:1067)
              at hudson.BulkChange.commit(BulkChange.java:98)
              at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1346)
              at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:412)
              at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:35)
              at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131)
              at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: 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: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)
              ... 13 more
      Caused by: java.lang.RuntimeException: Failed to serialize org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildSummaryAction#textBuilder for class org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildSummaryAction
              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.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
              at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
              at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)
              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)
              ... 26 more
      Caused by: java.lang.UnsupportedOperationException: Refusing to marshal java.lang.StringBuilder 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)
              ... 41 more
      

        Attachments

          Activity

          Hide
          jglick Jesse Glick added a comment -

          Probably textBuilder should be transient or a String.

          Show
          jglick Jesse Glick added a comment - Probably textBuilder should be transient or a String .
          Hide
          markewaite Mark Waite added a comment - - edited

          I confirmed that the change to Jenkins core resolves the message.

          Show
          markewaite Mark Waite added a comment - - edited I confirmed that the change to Jenkins core resolves the message.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Resolved by the Jenkins Core patch

          Show
          oleg_nenashev Oleg Nenashev added a comment - Resolved by the Jenkins Core patch
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          pom.xml
          http://jenkins-ci.org/commit/groovy-postbuild-plugin/6fd0cd8a95015e394fc61bae14ab4bcc2cf2bc08
          Log:
          JENKINS-48922 - Update plugin POM to reproduce the issue in PCT

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: pom.xml http://jenkins-ci.org/commit/groovy-postbuild-plugin/6fd0cd8a95015e394fc61bae14ab4bcc2cf2bc08 Log: JENKINS-48922 - Update plugin POM to reproduce the issue in PCT
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: ikedam
          Path:
          Jenkinsfile
          pom.xml
          http://jenkins-ci.org/commit/groovy-postbuild-plugin/61f2d13e491ea42a5572590b1903a0acfbfef11c
          Log:
          Merge pull request #29 from oleg-nenashev/jep-200/pct-compat

          JENKINS-48922 - Update plugin to make it runnable in PCT

          Compare: https://github.com/jenkinsci/groovy-postbuild-plugin/compare/c2638a586703...61f2d13e491e

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: Jenkinsfile pom.xml http://jenkins-ci.org/commit/groovy-postbuild-plugin/61f2d13e491ea42a5572590b1903a0acfbfef11c Log: Merge pull request #29 from oleg-nenashev/jep-200/pct-compat JENKINS-48922 - Update plugin to make it runnable in PCT Compare: https://github.com/jenkinsci/groovy-postbuild-plugin/compare/c2638a586703...61f2d13e491e

            People

            • Assignee:
              oleg_nenashev Oleg Nenashev
              Reporter:
              oleg_nenashev Oleg Nenashev
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: