KNIME 批处理模式执行 hangs/never returns(从 Java 进程开始)

KNIME batch mode execution hangs/never returns (started from Java process)

我正在 Java 中的 batch mode 中执行 KNIME 工作流程。

输出好像是成功了,但是进程一直没有returns(我得用timeout参数杀掉)

问题:有没有人知道为什么进程从不 returns?

Executing [C:\Program Files\KNIME\KNIME.exe, -noexit, -nosplash, -nosave, -reset, -application, org.knime.product.KNIME_BATCH_APPLICATION, -workflowFile="C:\...\workflow.knwf", -workflow.variable=template.sdf,C:\...\template.sdf,String, --launcher.suppressErrors]  [main] at AntBuildLogger.messageLogged()
KNIME.exe stdout: CompilerOracle: exclude javax/swing/text/GlyphView.getBreakSpot                            [Thread-2] at AntBuildLogger.messageLogged()
KNIME.exe stdout: INFO   main BatchExecutor  ===== Executing workflow C:\...\workflow.knwf =====  [Thread-2] at AntBuildLogger.messageLogged()
...
KNIME.exe stdout: INFO   main BatchExecutor  Workflow execution done Finished in 3 secs (3937ms)             [Thread-2] at AntBuildLogger.messageLogged()
KNIME.exe stdout: INFO   main BatchExecutor  ============= Workflow executed sucessfully ===============     [Thread-2] at AntBuildLogger.messageLogged()

我正在使用 Windows 10 和 KNIME 3.2.1。

我正在以编程方式使用 Ant Exec 任务,所以我非常有信心所有 in/out/err streams are handled correctly(而且我正在使用该代码调用许多其他可执行文件)。

这是由 -noexit 参数引起的(它在 Windows 手动启动时很有用)因为它防止在完成执行后关闭进程。

Windows 需要 -consoleLog -noexit 保持 DOS window 打开以查看控制台输出。测试 Knime 批处理 运行 后,您可以删除 -consoleLog -noexit 参数,这样它就不会在等待用户退出进程时挂起。

要查看其他选项,您可以 运行 在 DOS window 中执行以下操作。 knime.exe -consoleLog -noexit -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION