Hi all, 

I have a (I hope) stupid issue that i am not able to solve

I am calling to a method that only call a bash script like this.


> def exists(path) {
>    try{
>            sh(script:'ls -l',
>            returnStdout: true).trim()
>            return false
>      } catch (err){ error "-E- Failed to run fs.exists(${path}), 
> Exception err: ${err}"}
> }
>
>
>
And I am always getting this exception

*07:55:59*  java.io.NotSerializableException: java.lang.UNIXProcess
[Pipeline] End of Pipeline
an exception which occurred:
        in field groovy.lang.Closure.delegate
        in object org.jenkinsci.plugins.workflow.cps.CpsClosure2@5ac3f4cc
        in field org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.closures
        in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@239d9620
        in object org.jenkinsci.plugins.workflow.cps.CpsThreadGroup@239d9620
Caused: java.io.NotSerializableException: java.lang.UNIXProcess
        at 
org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:926)
        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.LinkedHashMap.internalWriteEntries(LinkedHashMap.java:333)
        at java.util.HashMap.writeObject(HashMap.java:1363)
        at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)

...


Any clue?

Jenkins 2.222.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1c647bd5-c779-427a-bf98-1a61b5074b65o%40googlegroups.com.

Reply via email to