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

java.lang.UnsupportedOperationException: Refusing to marshal org.apache.hc.client5.http.impl.classic.CloseableHttpResponse for security reasons

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None

      We are currently using the Jenkins pipeline with the Acunetix360 Plugin. While the connection and scanning jobs are functioning correctly, we have encountered an issue after the scan completes.

      In the attached image(acunetix.png), you can see that the scan finishes successfully, and the subsequent stages proceed without any issues. However, in error.PNG, an error related to Acunetix occurs in the following stages after the scan. Despite the Acunetix scan stage completing without errors, subsequent stages fail due to this issue.

      We have attempted to resolve the error by adding the following JVM argument:

      -Dhudson.remoting.ClassFilter=com.acunetix.model.ScanReport,com.acunetix.model.ScanRequestResult

       

      Unfortunately, this did not resolve the issue, and we continue to experience the error.

      We have observed this error typically arises when the scan duration exceeds 1-4 hours. We believe this might be related to the Acunetix plugin.

      How can we resolve this issue?
      java.lang.UnsupportedOperationException: Refusing to marshal org.apache.hc.client5.http.impl.classic.CloseableHttpResponse for security reasons; see
      https://www.jenkins.io/redirect/class-filter/
      at hudson.util.XStream2$BlacklistedTypesConverter.marshal(XStream2.java:642)
      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)
      Caused: java.lang.RuntimeException: Failed to serialize com.acunetix.model.ScanReport#reportRequestResponse for class com.acunetix.model.ScanReport
      at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274)
      at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
      at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
      at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
      at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      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)
      Caused: java.lang.RuntimeException: Failed to serialize com.acunetix.model.ScanRequestResult#report for class com.acunetix.model.ScanRequestResult
      at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274)
      at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
      at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
      at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
      at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      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)
      Caused: java.lang.RuntimeException: Failed to serialize com.acunetix.plugin.ACXScanResultAction#scanRequestResult for class com.acunetix.plugin.ACXScanResultAction
      at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274)
      at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
      at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
      at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
      at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      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)
      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:274)
      at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
      at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
      at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
      at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      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.TreeMarshaller.start(TreeMarshaller.java:83)
      at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
      at com.thoughtworks.xstream.XStream.marshal(XStream.java:1303)
      at com.thoughtworks.xstream.XStream.marshal(XStream.java:1292)
      at com.thoughtworks.xstream.XStream.toXML(XStream.java:1265)
      at hudson.XmlFile.write(XmlFile.java:216)
      Caused: java.io.IOException
      at hudson.XmlFile.write(XmlFile.java:223)
      at org.jenkinsci.plugins.workflow.support.PipelineIOUtils.writeByXStream(PipelineIOUtils.java:30)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.save(WorkflowRun.java:1251)
      at org.jenkinsci.plugins.workflow.cps.EnvActionImpl.setProperty(EnvActionImpl.java:132)
      at org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.java:213)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:497)
      at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.setProperty(DefaultInvoker.java:44)
      at org.jenkinsci.plugins.workflow.cps.LoggingInvoker.setProperty(LoggingInvoker.java:139)
      at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawSet(PropertyAccessBlock.java:24)
      Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 67c1efee-2c06-463a-aa95-055adcf5300c
      Caused: java.lang.RuntimeException
      at org.jenkinsci.plugins.workflow.cps.EnvActionImpl.setProperty(EnvActionImpl.java:134)
      at org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.java:213)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:497)
      at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.setProperty(DefaultInvoker.java:44)
      at org.jenkinsci.plugins.workflow.cps.LoggingInvoker.setProperty(LoggingInvoker.java:139)
      at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawSet(PropertyAccessBlock.java:24)
      at mfePipeline.call(mfePipeline.groovy:240)
      at __cps.transform__(Native Method)
      at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.set(PropertyishBlock.java:87)
      at com.cloudbees.groovy.cps.impl.AssignmentBlock$ContinuationImpl.assignAndDone(AssignmentBlock.java:70)
      at jdk.internal.reflect.GeneratedMethodAccessor756.invoke(Unknown Source)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
      at com.cloudbees.groovy.cps.Next.step(Next.java:83)
      at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:147)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:17)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:49)
      at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:180)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:422)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:330)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:294)
      at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$wrap$4(CpsVmExecutorService.java:140)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
      at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
      at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:53)
      at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:50)
      at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
      at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
      at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$categoryThreadFactory$0(CpsVmExecutorService.java:50)
      at java.base/java.lang.Thread.run(Thread.java:840)
      /var/lib/jenkins/jobs/IMS-Frontend/workspace/mfe-transfer@tmp/jfrog/31/.jfrog deleted
      Finished: FAILURE

        1. acunetix.png
          acunetix.png
          339 kB
        2. error.PNG
          error.PNG
          132 kB

          [JENKINS-75206] java.lang.UnsupportedOperationException: Refusing to marshal org.apache.hc.client5.http.impl.classic.CloseableHttpResponse for security reasons

          There are no comments yet on this issue.

            acunetix360 acunetix360 acunetix360
            ariuk Ariunzaya
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: