A new update. I fixed the "The class 'FileSearch' has an incorrect modifier 
static." - the static class must be embedded in  another class. Here's the 
gist <https://gist.github.com/savornicesei/c9dbafec8339b1e8d18c1d4a6e620baa>
.

Now I'm left with 2 other issues:
1. at build time (isDebugMode = false)  Thread.currentThread()?.executable 
returns null. Always. I think it's something related to the job running on 
the slave but I have no idea with what should I replace it to make it work.
2. if the script is run (from job or from Scriptler) with isDebugMode = 
true, the remote communication fails with:

FATAL: remote file operation failed: 
d:\jenkins\workspace\My_Project_Name/Src/SolutionInfo.cs at 
hudson.remoting.Channel@1b37fe1:win_01: java.io.IOException: Remote call on 
win_01 failedjava.io.IOException 
<http://stacktrace.jenkins-ci.org/search?query=java.io.IOException>: remote 
file operation failed: d:\jenkins\workspace\My_Project_Name/Src/SolutionInfo.cs 
at hudson.remoting.Channel@1b37fe1:win_01: java.io.IOException: Remote call on 
win_01 failed
        at hudson.FilePath.act(FilePath.java:1014) 
<http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.act&entity=method>
        at hudson.FilePath.act(FilePath.java:996) 
<http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.act&entity=method>
        at hudson.FilePath$act$1.call(Unknown Source)
[...]

java.io.IOException: Remote call on win_01 failed

[...]

java.lang.Error: Failed to deserialize the Callable object.

[...]

java.lang.IllegalArgumentException: Unable to locate class file for class 
FileParser$FileSearch
        at hudson.remoting.Which.classFileUrl(Which.java:60)
        at 
hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch4(RemoteClassLoader.java:775)
        at 
hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch3(RemoteClassLoader.java:803)
        at sun.reflect.GeneratedMethodAccessor2256.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:884)
        at hudson.remoting.Request$2.run(Request.java:332)


I updated the slave.jar used on the slave machine and restarted the agent. 
Both master and slave machines have Win 7 on them and are configured the 
same (jenkins path, java version, etc).
I also cannot replace the groovy script with something else because it's 
evaluated by EnvInject.

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/eaed7132-699d-40e1-9434-352599cccddc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to