Following investigation from Thomas Mortagne , it appears that this issue is caused by the fact that the class loader of the groovy code is thread-dependent and there was nothing in the job macro's thread initializing the classloader properly for that thread. Thus, code was added to cleanup the classloader from the execution context upon copy (just to be sure) and then an initialization of the class loader was added in the job thread of the job macro. |