Batch Executor Problem

Hi,

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

Oscar

 

[1]

!SESSION 2012-11-29 15:42:12.604 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_22
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/Pretreatment_103000.zip -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/Pretreatment_103000.zip -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
java.io.IOException: Cannot create temporary directory 'C:\Users\Xavi\AppData\Local\Temp\BatchExecutorInput13542001354120'.
    at org.knime.core.util.FileUtil.createTempDir(FileUtil.java:768)
    at org.knime.core.util.FileUtil.createTempDir(FileUtil.java:742)
    at org.knime.core.node.workflow.BatchExecutor.mainRun(BatchExecutor.java:493)
    at org.knime.product.headless.KNIMEBatchApplication.start(KNIMEBatchApplication.java:83)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    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(Main.java:619)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
 

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/Pretreatment_103000.zip [...]

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!

Oscar

 

 

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