3

I would like to execute a workflow KNIME with a Batch file but i have an error :

ERROR KNIME-Worker-2 Call Local Workflow  Execute failed : java.lang.NullPointerException 

My workflow knime work well on Knime but i don't know why I have this error.

This is my Batch file :

"C:\Program Files\KNIME\knime.exe" -nosave -consoleLog -noexit -nosplash -reset 
-application org.knime.product.KNIME_BATCH_APPLICATION 
-preferences="C:\Users\Admnistrator\Desktop\KNIME_Preferences.epf" 
-workflowDir="C:\Users\Admnistrator\knime-workspace\SPC_SIMTest" 

Knime report Java :

Java was started but returned exit code = 4

I'm not find solution. Can you help me ?

R.Bun
  • 71
  • 1
  • 8
  • I have the same problem. Did you ever find a solution? – DragonFlyOfGold Nov 17 '20 at 17:15
  • @DragonFlyOfGold The solution has already been answered, add the `--launcher.suppressErrors` switch to the command like `eclipsec.exe --consoleLog --noexit --nosplash --launcher.suppressErrors --application org.knime.product.KNIME_BATCH_APPLICATION` and resetting and checking the workflow. Are you experiencing any other issues? – Nico Nekoru Nov 19 '20 at 21:32

1 Answers1

2

If you run the command without options, e.g. eclipsec.exe -consoleLog -noexit -nosplash -launcher.suppressErrors -application org.knime.product.KNIME_BATCH_APPLICATION

then you will see a list of the available options and the java return codes. In particular, return code 4 indicates if an error during execution occurred

Often this sort of problem can be fixed by openning the workflow in the KNIME desktop, checking for any errors, reset the workflow and save it again, as an error during loading (e.g partially executed loops to pick a common one) could cause problems. Then try re-loading the workflow in the KNIME desktop and check no errors during load are recorded during the console. Also, adding the option --launcher.suppressErrors to your command line can sometimes avoid issues like this.

SteveR
  • 583
  • 2
  • 12