Java was started but exit code=2 issue

When I used a batch file to execute knime workflow, it was occurred as Java was started but exit code=2 issue.
How to solve this issue?

Anyone can help to solve this issue?

The issue appears to be related to an incorrect folder path.

The folder path is correct.

You’ve only pasted the error here. Can you paste the complete command are you using to start execution? It’s cut off in the header of your command window.

@ArjenEx is on to something here - you wouldn’t see an ERROR about the folder path if there wasn’t something wrong. Maybe it’s the font, but something about the quotes around E:\workspace\AOI_by_hour looks off. Have you tried different single quotes, or double quotes instead?

My full command as below:
echo off
“E:\knime\knime.exe" -consoleLog -nosplash -reset -application org.knime.product.KNIME_BATCH_APPLICATION -preferences=“E:\KNIME_SERVER\KNIME_SERVER.epf" -workflowDir=“E:\workspace\AOl_by_hour"
exit /b

BTW, I had tried single quotes and double quotes, also had the same issue.

Shots in the dark here…

Does anything change if you add a trailing slash to the workflowDir?

Does anything change if you execute the workflow with -workflowFile=SomeFile.knwf instead of using -workflowDir=... ?


I had change to workflowfile as below:

echo off
“E:/knime/knime.exe” -consolelog -nosplash -reset -application
org.knime.product.KNIME BATCH APPLICATION -preferences=“E:/KNIME SERVER/KNIME_ SERVER.epf”
exit /b

It sames workflow is run, but still had issues as exit code=4

In that case, I would run the WF in KNIME AP and see what the error is. Exit code 4 means the WF runs, but encounters an error.


Thank you very much.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.