Java Exit Code 4 in Batch Mode Despite Successful Manual Run in KNIME GUI

My workflow runs successfully when executed manually on KNIME. However, when I run it via batch mode, I encounter java exit code 4. (show screenshot)

The flow runs fully and successfully through batch mode, but still gets this issue when done executing.

Memory assigned in the config file : -Xmx48g


$knimeProcess = Start-Process -FilePath $pathToKniMe -ArgumentList “-nosave -consoleLog -reset -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=$pathToWorkflowFolder” -RedirectStandardOutput $stdoutPath -RedirectStandardError $stderrPath -PassThru -Wait

Urg, they are pretty ugly and intrasparent. Please check you do not have any single node connected to the workflow which has no end, e.g. a row-filter you have implemented for tests. If so, delete these branches and try again. For me, it sovles at least 50% of these ugly startup-issues.

If it doesn’t help but you do not bother, add the " --launcher.suppressErrors" paramter to continue. But please be aware that this only suppresses the sympton and if there is another issue, you won’t be informed about it.

Thanks for the suggestion. I’ve deleted all the nodes in tthe workflow which has no end. I’ve also added try - catch error handling across my workflow, however I’m still encountering these issues.

I’d rather not use the --launcher.suppressErrors parameter.

I’m still facing the same error, could there be another reason?

@Certified-Trainers need your help on this

Hi @akhil2698 -

This seems to be affecting several folks since the 5.5 release. Can you take a look at this post?

Hi!
I see you add a -consoleLog parameter into the script, please post here a print from the black window that appear when you execute your workflow. There you can see whatever is not working trought the execution.

@akhil2698 ,

The “exit code 4” error in Eclipse typically indicates a problem with the Java Runtime Environment (JRE) configuration, often due to a mismatch between the JRE and Eclipse versions.

What is the value you are providing in -vm ? I don not see it in your conf.

Hi,

Here’s the result from the window:

Hi,

-vm
plugins/org.knime.binary.jre.win32.x86_64_17.0.5.20221116/jre/bin/server/jvm.dll

There you go

Hi,

I’ve tried using this command
Dorg.knime.js.cef.skip_windowless_chromium_initialization=true.
but KNIME takes a long time to start and eventually becomes unresponsive.

Is it the whole window? You can copy and paste the windows result here.
Although we can see all your nodes created an empty data table, is that expected?

It starts from here,


Yes, it is expected in some cases

@akhil2698 has this ever worked? Do you have any dynamic FlowVariables? Do you have set them as Workflow Variables?

Next step i do when face issues like that, I delete the -nosave parameter, run my workflow then open it in knime, it will be saved in the same way it runs, so i can see if some node executed with error.

1 Like