DB connector cannot run in batch mode

I want to schedule my workflow through batch mode and windows task scheduler.
But when I run the workflow in batch mode, it show errors.
The error message shows that the driver of DB connector cannot be found.
I try to assign specific preference file, but it didn’t work either.
I find that there is no driver information in my export preference file like “/instance/org.knime.database/drivers/”
So how can I solve this problem?

Bat file:

Blockquote
“C:\Users\cui.z.1\KNIME\knime.exe”^
-consoleLog -reset -nosave -nosplash ^
-application org.knime.product.KNIME_BATCH_APPLICATION
-preferences=“C:\Users\cui.z.1\KNIME\20220928.epf”^
-workflowDir=“C:\Users\cui.z.1\knime-workspace\Skin WF\0-Skin DataBase\16-D-1 InDex Report”

Error message.txt (5.8 KB)
preference file.txt (7.8 KB)

Uploading: knime preference-database driver.png…Uploading: knime preference-database driver.png…
Uploading: Error message.txt…Uploading: Error message.txt…

Hello,

Firstly, if you are using batch execution mode, we recommend the use of KNIME Server for its ability to perform workflow scheduling and configuration of drivers via the client-profiles subsystems.

Secondly, your error message
ERROR main Node Loading model settings failed: Could not find the [SPARK42DB] database driver.
org.knime.core.node.InvalidSettingsException: Could not find the [SPARK42DB] database driver.

is indicative that the database driver is not being picked up in the execution context.

If we review “preference file.txt” (which I assume is actually the 20220928.epf), and search for ‘spark’ we see no database driver definitions in that file.

So the recommendation is to go into AP (where you have the SPARK42DB driver defined), use File>Export preferences, and then open the file with the exported preferences and grab the lines pertaining to SPARK42DB. Then, paste those lines into the preference file.txt/20220928.epf so the execution context knows where the driver file is and how to interact with it. That should make it work correctly.

Regards,
Nickolaus

1 Like

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