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

java.util.LinkedHashMap$Entry not serializable in Pipeline

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • workflow-cps-plugin
    • None
    • Jenkins 2.108
      latest plugins
      Master: Windows 2008 R2 x64, 2.
      Slave: Windows 10 Pro x64

       

      def remote_watch_urls = [
          './branches': 'my url/branches', 
          './releases': 'my url/releases'
          ]
      for ( loc in remote_watch_urls )
      {
          echo "remote_watch_urls server: ${loc.key}: ${loc.value}"
      }
      stage ('Get extension API versions')
      {
          node('BUILD_WIN_64') {
              ws("w/${env.JOB_NAME}".replace('%', '_')) {
                  stage("Checkout") {
                      for ( loc in remote_watch_urls )
                      {
                          echo "remote_watch_urls slave: ${loc.key}: ${loc.value}"
                          checkout changelog: false, scm: [$class: 'SubversionSCM', additionalCredentials: [], excludedCommitMessages: '', excludedRegions: '', excludedRevprop: '', excludedUsers: '', filterChangelog: false, ignoreDirPropChanges: false, includedRegions: '', locations: [[credentialsId: 'my credentialsid', depthOption: 'infinity', ignoreExternalsOption: true, local: loc.key, remote: loc.value]], quietOperation: true, workspaceUpdater: [$class: 'UpdateWithCleanUpdater']]
                      }
                  }
              }
         }
      }
      

      This is a minial script for repro. The checkout step fails and I'm not sure why. The echo steps work fine. There's more steps and stages after the checkout steps that's not included, but actually nothing prior to the posted script.

      [BFA] Scanning build for known causes...
       [BFA] No failure causes found
       [BFA] Done. 2s
       an exception which occurred:
       in field com.cloudbees.groovy.cps.impl.BlockScopeEnv.locals
       in object com.cloudbees.groovy.cps.impl.LoopBlockScopeEnv@e92a85
       in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent
       in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@1fc9156
       in field com.cloudbees.groovy.cps.impl.ProxyEnv.parent
       in object com.cloudbees.groovy.cps.impl.BlockScopeEnv@190fed5
       in field com.cloudbees.groovy.cps.impl.CallEnv.caller
       in object com.cloudbees.groovy.cps.impl.FunctionCallEnv@1864fef
       in field com.cloudbees.groovy.cps.Continuable.e
       in object org.jenkinsci.plugins.workflow.cps.SandboxContinuable@ad9bff
       in field org.jenkinsci.plugins.workflow.cps.CpsThread.program
       in object org.jenkinsci.plugins.workflow.cps.CpsThread@1c261a6
       in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.threads
       in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@bdabe9
       in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@bdabe9
       Caused: java.io.NotSerializableException: java.util.LinkedHashMap$Entry
       at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:860)
       at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
       at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
       at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
       at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
       at java.io.ObjectOutputStream.writeObject(Unknown Source)
       at java.util.HashMap.internalWriteEntries(Unknown Source)
       at java.util.HashMap.writeObject(Unknown Source)
       at sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:273)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:976)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:967)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
       at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
       at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
       at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
       at org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
       at java.io.ObjectOutputStream.writeObject(Unknown Source)
       at java.util.TreeMap.writeObject(Unknown Source)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:273)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:976)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
       at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
       at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:58)
       at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:111)
       at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.lambda$writeObject$0(RiverWriter.java:144)
       at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
       at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.writeObject(RiverWriter.java:143)
       at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:467)
       at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:443)
       at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgramIfPossible(CpsThreadGroup.java:430)
       at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:367)
       at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:82)
       at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:243)
       at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:231)
       at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
       at java.util.concurrent.FutureTask.run(Unknown Source)
       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(Unknown Source)
       at java.util.concurrent.FutureTask.run(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
       at java.lang.Thread.run(Unknown Source)
       Finished: FAILURE

            Unassigned Unassigned
            gl1koz3 Edgars Batna
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: