I am facing a problem when an individual .executeCommand() call is time consuming and hence is failing with the below Exception:
Mar 02, 2016 1:14:52 PM com.profesorfalken.jpowershell.PowerShellCommandProcessor call
SEVERE: null
java.lang.InterruptedException: sleep interrupted
at java.lang.Thread.sleep(Native Method)
at com.profesorfalken.jpowershell.PowerShellCommandProcessor.continueReading(PowerShellCommandProcessor.java:98)
at com.profesorfalken.jpowershell.PowerShellCommandProcessor.call(PowerShellCommandProcessor.java:70)
at com.profesorfalken.jpowershell.PowerShellCommandProcessor.call(PowerShellCommandProcessor.java:1)
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)
I am going to try to play with the below variables in the source code:
static final int WAIT_PAUSE = 10;
static final int MAX_WAIT = 2000;
Do you think they should be exposed as part of the constructor for PowerShell?
Please disregard what you see above. It was a fault in my code. I learned that files accessed by powershell command should be closed in the java program before running the command
Hi,
I am facing a problem when an individual .executeCommand() call is time consuming and hence is failing with the below Exception:
Mar 02, 2016 1:14:52 PM com.profesorfalken.jpowershell.PowerShellCommandProcessor call SEVERE: null java.lang.InterruptedException: sleep interrupted at java.lang.Thread.sleep(Native Method) at com.profesorfalken.jpowershell.PowerShellCommandProcessor.continueReading(PowerShellCommandProcessor.java:98) at com.profesorfalken.jpowershell.PowerShellCommandProcessor.call(PowerShellCommandProcessor.java:70) at com.profesorfalken.jpowershell.PowerShellCommandProcessor.call(PowerShellCommandProcessor.java:1) 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)
I am going to try to play with the below variables in the source code:
static final int WAIT_PAUSE = 10; static final int MAX_WAIT = 2000;
Do you think they should be exposed as part of the constructor for PowerShell?