Bar Charts fails in batch mode

I have a workflow which works fine when executed in Knime but fails when I run it in the console. It seems to be related to the bar chart nodes. I created a minimal example, which has the same problems.


BarChartFail.knwf (10.9 KB)

I execute the workflow like this:

"C:\Program Files\KNIME\knime.exe" -nosplash -consoleLog -noexit -nosave -reset --launcher.suppressErrors -application org.knime.product.KNIME_BATCH_APPLICATION -workflowFile=BarChartFail.knwf

The error is:

ERROR    KNIME-Worker-3-Bar Chart 3:148 CEFImageGenerator        Executing script failed after 10 attempts. The script is: 'return document.getElementById('node-SINGLE').contentWindow.dynamicJSNode.getSVG();'

I tried on two PCs, same error. Any ideas?
I have other flows which run fine in batch mode, but none of them contain bar charts (or any other JavaScript Visualisation Nodes)

@masgo have you tried converting the imager to a PNG file before export?

Thank you for the suggestion. The results are surprising. When I run the Workflow normally, I am getting a normal PNG output. But when I run it from the console I no longer get the previous error. I am getting a PNG (with the dimensions I set) but just look at it:

Here is the flow, if someone want to try. Maybe there is something wrong with my installation?
BarChartFail2.knwf (14.5 KB)

I found a solution - but my solution makes me belive the initial problem is caused by a bug or miss-configuration.

How to solve:

  1. Install “KNIME Bundled Chromium Browser (legacy)”
  2. Go to Preferences → JavaScript Views → set headless browser to “Bundled Headless Chromium” (version 91 in my case)

I can not explain why the following steps are needed. Looks like KNIME is somehow ignoring my local preferences. But on the other hand it obeys them, because it uses my custom DB drivers.

  1. Export your preferences to a file
  2. Remove everything except the first line, last line, and the line

  1. Call the batch mode with the -preferences parameter and provide the file from above.
"C:\Program Files\KNIME\knime.exe" -noexit -nosplash -consoleLog -nosave -reset --launcher.suppressErrors -application org.knime.product.KNIME_BATCH_APPLICATION -workflowFile=workflow.knwf -preferences=preferences.epf

(you probably want to remove -noexit after you confirmed it works)

There still seems to be some kind of bug, because knime crashes liks this. But the image writer is the very last node on my flow and all images are written correctly before the crash.

Exception in thread "Thread-5" java.lang.IllegalStateException: Executor has been shut down
        at org.apache.sshd.common.util.ValidateUtils.createFormattedException(
        at org.apache.sshd.common.util.ValidateUtils.throwIllegalStateException(
        at org.apache.sshd.common.util.ValidateUtils.checkState(
        at org.apache.sshd.common.util.threads.NoCloseExecutor.execute(
        at java.base/ Source)
        at java.base/ Source)
        at java.base/ Source)
        at java.base/ Source)
        at java.base/$WriteTask.completed(Unknown Source)
        at java.base/$ Source)
        at java.base/ Source)
1 Like

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