[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Jesse Glick reopened an issue Best to reopen since the original fix covered only ArrayList, not other collections. Jenkins / JENKINS-27421 java.util.ArrayList$Itr is not Serializable Change By: Jesse Glick Resolution: Fixed Status: Resolved Reopened Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title SCM/JIRA link daemon commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Code changed in jenkins User: Jesse Glick Path: cps/src/main/java/org/jenkinsci/plugins/workflow/cps/persistence/IteratorHack.java cps/src/test/java/org/jenkinsci/plugins/workflow/SerializationTest.java http://jenkins-ci.org/commit/workflow-cps-plugin/4ab54f1ad2ef9685e66804dc3d3de7add29fc505 Log: [FIXED JENKINS-27421] Producing a safe serialization replacement for ArrayList$Itr, Originally-Committed-As: a990468a828e64961eda24332673c9cb8835c629 Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title SCM/JIRA link daemon resolved as Fixed Jenkins / JENKINS-27421 java.util.ArrayList$Itr is not Serializable Change By: SCM/JIRA link daemon Status: In Progress Resolved Resolution: Fixed Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title SCM/JIRA link daemon commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/SerializationTest.java http://jenkins-ci.org/commit/workflow-cps-plugin/0ceee9b7cb7bded004cd93e2927230b5d9c5 Log: JENKINS-27421 Reproduced in test. Originally-Committed-As: e916b5e9f35b00db679360dc29e42658d566efb7 Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title SCM/JIRA link daemon commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Code changed in jenkins User: Jesse Glick Path: cps/pom.xml cps/src/main/java/org/jenkinsci/plugins/workflow/cps/persistence/IteratorHack.java cps/src/test/java/org/jenkinsci/plugins/workflow/SerializationTest.java http://jenkins-ci.org/commit/workflow-plugin/5b102a5b06745b1eeeb7c1305096bf80e37c1a90 Log: Merge pull request #372 from jenkinsci/eachClosure-JENKINS-26481 JENKINS-26481 JENKINS-27421 Fix ArrayList$Itr, and integration test for Object.each(Closure) Compare: https://github.com/jenkinsci/workflow-plugin/compare/e3906483924d...5b102a5b0674 Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title SCM/JIRA link daemon resolved as Fixed Jenkins / JENKINS-27421 java.util.ArrayList$Itr is not Serializable Change By: SCM/JIRA link daemon Status: In Progress Resolved Resolution: Fixed Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title SCM/JIRA link daemon commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Code changed in jenkins User: Jesse Glick Path: cps/src/main/java/org/jenkinsci/plugins/workflow/cps/persistence/IteratorHack.java cps/src/test/java/org/jenkinsci/plugins/workflow/SerializationTest.java http://jenkins-ci.org/commit/workflow-plugin/a990468a828e64961eda24332673c9cb8835c629 Log: [FIXED JENKINS-27421] Producing a safe serialization replacement for ArrayList$Itr, Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Jesse Glick started work on JENKINS-27421 Change By: Jesse Glick Status: Open In Progress Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Jesse Glick updated JENKINS-27421 Jenkins / JENKINS-27421 java.util.ArrayList$Itr is not Serializable Change By: Jesse Glick Status: Reopened Open Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Jesse Glick reopened an issue Not in master yet, be patient JIRA link daemon… Jenkins / JENKINS-27421 java.util.ArrayList$Itr is not Serializable Change By: Jesse Glick Resolution: Fixed Status: Resolved Reopened Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Jesse Glick commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Blocking at least the initially attempted use case from JENKINS-26481. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Jesse Glick commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Andrew Bayer an unrelated issue. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Andrew Bayer commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Is this related to JENKINS-26481 or is it a separate cause? Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Sam Van Oort commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Jesse Glick I've got a workaround for how to handle map iteration with Workflow DSL here. A bit ugly but it works: import com.cloudbees.groovy.cps.NonCPS @NonCPS List get_map_entries(map) { // This is harder than it seems, toArray and naive list construction don't work as expected // Also set iterators are forbidden, so you need an indexed collection def myarray = [] myarray.addAll(map.entrySet()) return myarray } node { def test_envs = [:] test_envs["debian:wheezy"] = ["echo goober"] def entries = get_map_entries(test_envs) for (int i=0; i
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Sam Van Oort edited a comment on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable [~jglick] I've got a workaround for how to handle map iteration with Workflow DSL here. A bit ugly but it works:{code}import com.cloudbees.groovy.cps.NonCPS@NonCPSList get_map_entries(map) {// This is harder than it seems, toArray and naive list construction don doesn 't work as expected and there are other gotchas to know // Also set iterators are forbidden, so you need an indexed collectiondef myarray = []myarray.addAll(map.entrySet())return myarray}node { def test_envs = [:] test_envs["debian:wheezy"] = ["echo goober"] def entries = get_map_entries(test_envs) for (int i=0; i
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Jesse Glick commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable NonCPS need not be imported—Workflow scripts get it by default. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Jesse Glick commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable If you use an asynchronous step sh "echo Key $key and value $value" you will see that your workaround does not really work: Started by user anonymous [Workflow] Allocate node : Start Running on master in … [Workflow] node { [Workflow] sh [flow] Running shell script [Workflow] } //node [Workflow] Allocate node : End [Workflow] End of Workflow java.io.NotSerializableException: java.util.LinkedHashMap$Entry at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:860) at … at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344) at java.util.HashMap.internalWriteEntries(HashMap.java:1777) at java.util.HashMap.writeObject(HashMap.java:1354) at … at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344) at java.util.TreeMap.writeObject(TreeMap.java:2434) at … at org.jenkinsci.plugins.workflow.support.pickles.serialization.RiverWriter.writeObject(RiverWriter.java:132) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.saveProgram(CpsThreadGroup.java:347) at … Caused by: an exception which occurred: in field locals in field parent in field parent in field caller in field e in field program in field threads in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@3e45e287 Finished: FAILURE Here is a working script: @NonCPS List> get_map_entries(map) { map.collect {k, v -> [k, v]} } node { def mymap = [a: 1, b: 2] def entries = get_map_entries(mymap) for (int i=0; i
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Sam Van Oort commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Worth noting (may be logged elsewhere or user error), but trying to do toArray on the entrySet to get an array output easily like so: def myarray = map.entrySet().toArray() Will give this error: hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: [Ljava.lang.Object;.get() is applicable for argument types: (java.lang.Integer) values: [0] Possible solutions: getAt(java.lang.Integer), grep(), getAt(java.lang.String), grep(java.lang.Object), getAt(java.util.Collection), getAt(groovy.lang.ObjectRange) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55) at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15) at WorkflowScript.run(WorkflowScript:31) at Unknown.Unknown(Unknown) at __cps.transform__(Native Method) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:69) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:106) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:79) at sun.reflect.GeneratedMethodAccessor745.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.LocalVariableBlock$LocalVariable.get(LocalVariableBlock.java:33) at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30) at com.cloudbees.groovy.cps.impl.LocalVariableBlock.evalLValue(LocalVariableBlock.java:22) at com.cloudbees.groovy.cps.LValueBlock$BlockImpl.eval(LValueBlock.java:55) at com.cloudbees.groovy.cps.LValueBlock.eval(LValueBlock.java:16) at com.cloudbees.groovy.cps.Next.step(Next.java:58) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:145) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:274) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:74) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:183) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:181) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112) 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:745) Finished: FAILURE
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Jesse Glick commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable The MissingMethodException is probably fixable by using entries[i] rather than entries.get(i). Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Sam Van Oort edited a comment on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Notable limitation: the closure-based solution can trigger script-security violation if you're running workflow scripts from SCM:org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods collect java.util.Map groovy.lang.Closureat Since the collect method takes a closure, AFAICT (and might be wrong) it looks like that *could* be unsafe to whitelist. Probably Also probably completely doable to find a non-closure approach to this though, just don't have one in hand right now. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Jesse Glick commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable That method is fine to whitelist. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Sam Van Oort commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Notable limitation: the closure-based solution can trigger script-security violation if you're running workflow scripts from SCM: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods collect java.util.Map groovy.lang.Closure at Since the collect method takes a closure, AFAICT (and might be wrong) it looks like that could be unsafe to whitelist. Probably completely doable to find a non-closure approach to this though, just don't have one in hand right now. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Sam Van Oort commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Yes, with note that it is safe because the passed closure is subject to the security rules. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Jesse Glick commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable steve sides unrelated user error. You cannot use an unserializable class such as JsonSlurper from a flow script unless it is contained entirely within a method marked @NonCPS. See the tutorial. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title steve sides edited a comment on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Here's another context where moving away from foreach was not effective . I was reading some mercurial repositories with source and subdir (to check out to) from a json file:{code:java}for(repomap in jsonrepos.configs.repos) {for ( key in repomap.keySet() ){source = repomap.get(key)['source']subdir = repomap.get(key)['subdir']checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"]) }{code}This looked nice and elegant, but I hit this exception noted in this bug, so I removed the foreach loops (I include the json steps here):{code:java}def slurper = new JsonSlurper()def jsonText = readFile 'flow-configs/prebuild.json'jsonrepos = slurper.parseText( jsonText )repoCount = jsonrepos.configs.repos.sizeprintln "repositories: ${repoCount}"for ( i = 0 ; i < repoCount ; i++ ) {rmap = jsonrepos.configs.repos[i]key = rmap.keySet().toList().getAt(0)source = rmap.get(key)['source']subdir = rmap.get(key)['subdir']println(" source: ${source} subdir: ${subdir}")checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"])}{code}It's fine up to the println statement. If you comment out the checkout line, it's all good and prints all the repsitories and subdir info, but if I uncomment out the checkout line I get this exception, which is similar to the rest reported except for the slurper part (which is curious).This may be a different bug(???), but the stack trace seems to be the same (except the json.JsonSlurper) as other bugs referred to as another instance of this bug.java.io.NotSerializableException: groovy.json.JsonSlurper 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(ObjectOutputStream.java:344) at java.util.HashMap.internalWriteEntries(HashMap.java:1777) at java.util.HashMap.writeObject(HashMap.java:1354) at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:271) 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.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.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
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title steve sides edited a comment on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Here's another context. I was reading some mercurial respotories with source and subdir (to check out to) from a json file (sorry for the formatting, not sure how to get jira to keep my spacing) : { { quote} for(repomap in jsonrepos.configs.repos) {for ( key in repomap.keySet() ){source = repomap.get(key)['source']subdir = repomap.get(key)['subdir']checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"]) } {quote} This looked nice and elegant, but I hit this exception, so I removed the foreach loops (I include the json steps here):def slurper = new JsonSlurper()def jsonText = readFile 'flow-configs/prebuild.json'jsonrepos = slurper.parseText( jsonText )repoCount = jsonrepos.configs.repos.sizeprintln "repositories: ${repoCount}"for ( i = 0 ; i < repoCount ; i++ ) {rmap = jsonrepos.configs.repos[i]key = rmap.keySet().toList().getAt(0)source = rmap.get(key)['source']subdir = rmap.get(key)['subdir']println(" source: ${source} subdir: ${subdir}")checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"])}It's fine up to the println statement. If you comment out the checkout line, it's all good and prints all the repsitories and subdir info, but if I uncomment out the checkout line I get this exception, which is similar to the rest reported except for the slurper part (which is curious):java.io.NotSerializableException: groovy.json.JsonSlurper 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(ObjectOutputStream.java:344) at java.util.HashMap.internalWriteEntries(HashMap.java:1777) at java.util.HashMap.writeObject(HashMap.java:1354) at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:271) 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.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.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
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title steve sides edited a comment on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Here's another context. I was reading some mercurial respotories with source and subdir (to check out to) from a json file: {{ for(repomap in jsonrepos.configs.repos) {for ( key in repomap.keySet() ){source = repomap.get(key)['source']subdir = repomap.get(key)['subdir']checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"]) }This looked nice and elegant, but I hit this exception, so I removed the foreach loops (I include the json steps here):def slurper = new JsonSlurper()def jsonText = readFile 'flow-configs/prebuild.json'jsonrepos = slurper.parseText( jsonText )repoCount = jsonrepos.configs.repos.sizeprintln "repositories: ${repoCount}"for ( i = 0 ; i < repoCount ; i++ ) {rmap = jsonrepos.configs.repos[i]key = rmap.keySet().toList().getAt(0)source = rmap.get(key)['source']subdir = rmap.get(key)['subdir']println(" source: ${source} subdir: ${subdir}")checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"])}It's fine up to the println statement. If you comment out the checkout line, it's all good and prints all the repsitories and subdir info, but if I uncomment out the checkout line I get this exception, which is similar to the rest reported except for the slurper part (which is curious):java.io.NotSerializableException: groovy.json.JsonSlurper 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(ObjectOutputStream.java:344) at java.util.HashMap.internalWriteEntries(HashMap.java:1777) at java.util.HashMap.writeObject(HashMap.java:1354) at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:271) 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.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.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
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title steve sides edited a comment on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Here's another context. I was reading some mercurial respotories with source and subdir (to check out to) from a json file (sorry for the formatting, not sure how to get jira to keep my spacing): {code:java} for(repomap in jsonrepos.configs.repos) {for ( key in repomap.keySet() ){source = repomap.get(key)['source']subdir = repomap.get(key)['subdir']checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"]) } {code} This looked nice and elegant, but I hit this exception, so I removed the foreach loops (I include the json steps here): {code:java} def slurper = new JsonSlurper()def jsonText = readFile 'flow-configs/prebuild.json'jsonrepos = slurper.parseText( jsonText )repoCount = jsonrepos.configs.repos.sizeprintln "repositories: ${repoCount}"for ( i = 0 ; i < repoCount ; i++ ) {rmap = jsonrepos.configs.repos[i]key = rmap.keySet().toList().getAt(0)source = rmap.get(key)['source']subdir = rmap.get(key)['subdir']println(" source: ${source} subdir: ${subdir}")checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"])} {code} It's fine up to the println statement. If you comment out the checkout line, it's all good and prints all the repsitories and subdir info, but if I uncomment out the checkout line I get this exception, which is similar to the rest reported except for the slurper part (which is curious):java.io.NotSerializableException: groovy.json.JsonSlurper 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(ObjectOutputStream.java:344) at java.util.HashMap.internalWriteEntries(HashMap.java:1777) at java.util.HashMap.writeObject(HashMap.java:1354) at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:271) 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.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.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
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title steve sides edited a comment on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Here's another context. I was reading some mercurial respotories with source and subdir (to check out to) from a json file (sorry for the formatting, not sure how to get jira to keep my spacing): {quote} for(repomap in jsonrepos.configs.repos) {for ( key in repomap.keySet() ){source = repomap.get(key)['source']subdir = repomap.get(key)['subdir']checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"]) } {quote} This looked nice and elegant, but I hit this exception, so I removed the foreach loops (I include the json steps here):def slurper = new JsonSlurper()def jsonText = readFile 'flow-configs/prebuild.json'jsonrepos = slurper.parseText( jsonText )repoCount = jsonrepos.configs.repos.sizeprintln "repositories: ${repoCount}"for ( i = 0 ; i < repoCount ; i++ ) {rmap = jsonrepos.configs.repos[i]key = rmap.keySet().toList().getAt(0)source = rmap.get(key)['source']subdir = rmap.get(key)['subdir']println(" source: ${source} subdir: ${subdir}")checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"])}It's fine up to the println statement. If you comment out the checkout line, it's all good and prints all the repsitories and subdir info, but if I uncomment out the checkout line I get this exception, which is similar to the rest reported except for the slurper part (which is curious):java.io.NotSerializableException: groovy.json.JsonSlurper 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(ObjectOutputStream.java:344) at java.util.HashMap.internalWriteEntries(HashMap.java:1777) at java.util.HashMap.writeObject(HashMap.java:1354) at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:271) 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.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.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
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title steve sides commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Here's another context. I was reading some mercurial respotories with source and subdir (to check out to) from a json file: for(repomap in jsonrepos.configs.repos) { for ( key in repomap.keySet() ){ source = repomap.get(key)['source'] subdir = repomap.get(key)['subdir'] checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "$ {source}", subdir: "${subdir}"]) } This looked nice and elegant, but I hit this exception, so I removed the foreach loops (I include the json steps here): def slurper = new JsonSlurper() def jsonText = readFile 'flow-configs/prebuild.json' jsonrepos = slurper.parseText( jsonText ) repoCount = jsonrepos.configs.repos.size println "repositories: ${repoCount}" for ( i = 0 ; i < repoCount ; i++ ) { rmap = jsonrepos.configs.repos[i] key = rmap.keySet().toList().getAt(0) source = rmap.get(key)['source'] subdir = rmap.get(key)['subdir'] println(" source: ${source} subdir: $ {subdir}") checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir} "]) } It's fine up to the println statement. If you comment out the checkout line, it's all good and prints all the repsitories and subdir info, but if I uncomment out the checkout line I get this exception, which is similar to the rest reported except for the slurper part (which is curious): java.io.NotSerializableException: groovy.json.JsonSlurper 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(ObjectOutputStream.java:344) at java.util.HashMap.internalWriteEntries(HashMap.java:1777) at java.util.HashMap.writeObject(HashMap.java:1354) at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:271) 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.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.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
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title steve sides edited a comment on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Here's another context. I was reading some mercurial respotories with source and subdir (to check out to) from a json file: for(repomap in jsonrepos.configs.repos) {for ( key in repomap.keySet() ){source = repomap.get(key)['source']subdir = repomap.get(key)['subdir']checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"]) }This looked nice and elegant, but I hit this exception, so I removed the foreach loops (I include the json steps here):def slurper = new JsonSlurper()def jsonText = readFile 'flow-configs/prebuild.json'jsonrepos = slurper.parseText( jsonText )repoCount = jsonrepos.configs.repos.sizeprintln "repositories: ${repoCount}"for ( i = 0 ; i < repoCount ; i++ ) {rmap = jsonrepos.configs.repos[i]key = rmap.keySet().toList().getAt(0)source = rmap.get(key)['source']subdir = rmap.get(key)['subdir']println(" source: ${source} subdir: ${subdir}")checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"])}It's fine up to the println statement. If you comment out the checkout line, it's all good and prints all the repsitories and subdir info, but if I uncomment out the checkout line I get this exception, which is similar to the rest reported except for the slurper part (which is curious):java.io.NotSerializableException: groovy.json.JsonSlurper 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(ObjectOutputStream.java:344) at java.util.HashMap.internalWriteEntries(HashMap.java:1777) at java.util.HashMap.writeObject(HashMap.java:1354) at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:271) 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.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.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
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title steve sides edited a comment on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Here's another context. I was reading some mercurial respotories with source and subdir (to check out to) from a json file (sorry for the formatting, not sure how to get jira to keep my spacing) : {code:java}for(repomap in jsonrepos.configs.repos) {for ( key in repomap.keySet() ){source = repomap.get(key)['source']subdir = repomap.get(key)['subdir']checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"]) }{code}This looked nice and elegant, but I hit this exception, so I removed the foreach loops (I include the json steps here):{code:java}def slurper = new JsonSlurper()def jsonText = readFile 'flow-configs/prebuild.json'jsonrepos = slurper.parseText( jsonText )repoCount = jsonrepos.configs.repos.sizeprintln "repositories: ${repoCount}"for ( i = 0 ; i < repoCount ; i++ ) {rmap = jsonrepos.configs.repos[i]key = rmap.keySet().toList().getAt(0)source = rmap.get(key)['source']subdir = rmap.get(key)['subdir']println(" source: ${source} subdir: ${subdir}")checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"])}{code}It's fine up to the println statement. If you comment out the checkout line, it's all good and prints all the repsitories and subdir info, but if I uncomment out the checkout line I get this exception, which is similar to the rest reported except for the slurper part (which is curious):java.io.NotSerializableException: groovy.json.JsonSlurper 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(ObjectOutputStream.java:344) at java.util.HashMap.internalWriteEntries(HashMap.java:1777) at java.util.HashMap.writeObject(HashMap.java:1354) at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:271) 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.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.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
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title steve sides edited a comment on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Here's another context. I was reading some mercurial respotories repositories with source and subdir (to check out to) from a json file:{code:java}for(repomap in jsonrepos.configs.repos) {for ( key in repomap.keySet() ){source = repomap.get(key)['source']subdir = repomap.get(key)['subdir']checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"]) }{code}This looked nice and elegant, but I hit this exception, so I removed the foreach loops (I include the json steps here):{code:java}def slurper = new JsonSlurper()def jsonText = readFile 'flow-configs/prebuild.json'jsonrepos = slurper.parseText( jsonText )repoCount = jsonrepos.configs.repos.sizeprintln "repositories: ${repoCount}"for ( i = 0 ; i < repoCount ; i++ ) {rmap = jsonrepos.configs.repos[i]key = rmap.keySet().toList().getAt(0)source = rmap.get(key)['source']subdir = rmap.get(key)['subdir']println(" source: ${source} subdir: ${subdir}")checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"])}{code}It's fine up to the println statement. If you comment out the checkout line, it's all good and prints all the repsitories and subdir info, but if I uncomment out the checkout line I get this exception, which is similar to the rest reported except for the slurper part (which is curious):java.io.NotSerializableException: groovy.json.JsonSlurper 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(ObjectOutputStream.java:344) at java.util.HashMap.internalWriteEntries(HashMap.java:1777) at java.util.HashMap.writeObject(HashMap.java:1354) at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:271) 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.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.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
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title steve sides edited a comment on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Here's another context. I was reading some mercurial repositories with source and subdir (to check out to) from a json file:{code:java}for(repomap in jsonrepos.configs.repos) {for ( key in repomap.keySet() ){source = repomap.get(key)['source']subdir = repomap.get(key)['subdir']checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"]) }{code}This looked nice and elegant, but I hit this exception noted in this bug , so I removed the foreach loops (I include the json steps here):{code:java}def slurper = new JsonSlurper()def jsonText = readFile 'flow-configs/prebuild.json'jsonrepos = slurper.parseText( jsonText )repoCount = jsonrepos.configs.repos.sizeprintln "repositories: ${repoCount}"for ( i = 0 ; i < repoCount ; i++ ) {rmap = jsonrepos.configs.repos[i]key = rmap.keySet().toList().getAt(0)source = rmap.get(key)['source']subdir = rmap.get(key)['subdir']println(" source: ${source} subdir: ${subdir}")checkout([$class: 'MercurialSCM', credentialsId: '', installation: '(Default)', source: "${source}", subdir: "${subdir}"])}{code}It's fine up to the println statement. If you comment out the checkout line, it's all good and prints all the repsitories and subdir info, but if I uncomment out the checkout line I get this exception, which is similar to the rest reported except for the slurper part (which is curious) : . This may be a different bug(???), but the stack trace seems to be the same (except the json.JsonSlurper) as other bugs referred to as another instance of this bug. java.io.NotSerializableException: groovy.json.JsonSlurper 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(ObjectOutputStream.java:344) at java.util.HashMap.internalWriteEntries(HashMap.java:1777) at java.util.HashMap.writeObject(HashMap.java:1354) at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:271) 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.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.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
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title SCM/JIRA link daemon commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/SerializationTest.java http://jenkins-ci.org/commit/workflow-plugin/e916b5e9f35b00db679360dc29e42658d566efb7 Log: JENKINS-27421 Reproduced in test. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title SCM/JIRA link daemon commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Code changed in jenkins User: Jesse Glick Path: aggregator/src/test/java/org/jenkinsci/plugins/workflow/PersistenceFailureTest.java aggregator/src/test/java/org/jenkinsci/plugins/workflow/PersistenceProblemStep.java aggregator/src/test/java/org/jenkinsci/plugins/workflow/PersistenceProblemStepExecution.java aggregator/src/test/java/org/jenkinsci/plugins/workflow/SerializationTest.java aggregator/src/test/java/org/jenkinsci/plugins/workflow/WorkflowTest.java http://jenkins-ci.org/commit/workflow-plugin/61b7d70b1238d9d66dea22f497cac26debaaf88e Log: Merge pull request #206 from jglick/Itr-JENKINS-27421 JENKINS-27421 Investigating ArrayList.Itr problem Compare: https://github.com/jenkinsci/workflow-plugin/compare/a24f13091cf8...61b7d70b1238 Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Jesse Glick started work on JENKINS-27421 Change By: Jesse Glick Status: Open In Progress Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Jesse Glick commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable owenmehegan you can already do that using def labels = ['linux', 'windows'] for (int i = 0; i labels.size(); i++) { node(labels.get(i)) { // something, though you presumably need to select sh vs. bat here } } Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups Jenkins Issues group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title owenmehegan commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Being able to write: node('linux_slave', 'windows_slave') { // some steps to run in parallel on both slaves } would be fantastic. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups Jenkins Issues group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title Jesse Glick commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable Workarounds: Use a plain C-style for-loop. Wrap the code in a method marked @NonCps, assuming it does not invoke anything interruptible (incl. calling Workflow steps). Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups Jenkins Issues group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Title: Message Title A C commented on JENKINS-27421 Re: java.util.ArrayList$Itr is not Serializable bump The inability to use collection iterators at all is a very significant limitation. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups Jenkins Issues group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [workflow-plugin] (JENKINS-27421) java.util.ArrayList$Itr is not Serializable
Jesse Glick created JENKINS-27421 java.util.ArrayList$Itr is not Serializable Issue Type: Bug Assignee: Jesse Glick Components: workflow-plugin Created: 13/Mar/15 7:22 PM Description: Not currently possible to use a Java 5-style for loop on an ArrayList (for example) from within CPS-transformed code, since its Iterator implementation is not marked Serializable. Project: Jenkins Labels: groovy serialization Priority: Major Reporter: Jesse Glick This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira -- You received this message because you are subscribed to the Google Groups Jenkins Issues group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.