Batch Executor Problem


I have implemented java-project in order to call knime workflows using Batch-Mode. The call is performed using a very simple combination of  Runtime + Process java objects:

// call contains the whole batch mode command

Runtime rt = Runtime.getRuntime();
Process p = rt.exec(call);

Generally this works fine, but sometimes (unfortunately I cannot replicate this on an specific example) an error is raised [1]. It seems that,  knime.exe is not able to uncompress the zip file which contains the workflow. How can I avoid this behaviour ?

thanks in advance




!SESSION 2012-11-29 15:42:12.604 -----------------------------------------------
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -reset -nosave -application org.knime.product.KNIME_BATCH_APPLICATION -workflowFile=C:/WORK/knime/Workflows/ -workflow.variable=model_id,25,int -workflow.variable=db_user,user,String -workflow.variable=db_password,pass,String -workflow.variable=db_url,jdbc:postgresql://localhost:5432/DB,String
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -reset -nosave -application org.knime.product.KNIME_BATCH_APPLICATION -workflowFile=C:/WORK/knime/Workflows/ -workflow.variable=model_id,25,int -workflow.variable=db_user,user,String -workflow.variable=db_password,pass,String -workflow.variable=db_url,jdbc:postgresql://localhost:5432/DB,String -data C:/WORK/knime/workspace/Pretreat25/

!ENTRY org.eclipse.osgi 4 0 2012-11-29 15:42:15.448
!MESSAGE Application error
!STACK 1 Cannot create temporary directory 'C:\Users\Xavi\AppData\Local\Temp\BatchExecutorInput13542001354120'.
    at org.knime.core.util.FileUtil.createTempDir(
    at org.knime.core.util.FileUtil.createTempDir(
    at org.knime.core.node.workflow.BatchExecutor.mainRun(
    at org.knime.product.headless.KNIMEBatchApplication.start(
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(
    at org.eclipse.equinox.launcher.Main.basicRun(

Good question. The batch executor is unable to create a temporary directory. This can have several reason, such as missing permissions, lack for free disc space, or the directory already exists (which is rather strange since we try to create a unique name for the directory). Unfortunately we don't get any more information when creating the directory fails.

thanks for your message. Another doubt:

Will it happen the same if the workflow is not compressed ?


In the first message, the Batch Mode Call specifed a compressed workflow: 

[...] -workflowFile=C:/WORK/knime/Workflows/ [...]

Then (educated guess) knime.exe uncompresses the .zip file into the temporal folder of the System and executes it. But, if the workflow is already uncompressed and the Batch Mode Call is modified such:

[...] -workflowDir=C:/WORK/knime/Workflows/Pretreatment_103000 [...]

there is no need of uncompressing it. Is that true, Am I missing something ?

thanks in advance!




No, you are right, if the workflow is already present in a directory, there is no need to uncompress it.