Command Line Execution - ClassNotFoundException

Hi KNIME,

I have a working workflow in GUI mode that I want to automate via command line execution.

The Java compiler called via knime.exe tells me that it cannot find the class com.microsoft.sqlserver.jdbc.SQLServerDriver that lives in a 3rd party JAR file.

Isn't the command line KNIME invoked with the same class loading mechanism than the graphical version? I also tried to add the JAR file to Preferences -> Java -> Build Path -> Classpath Variable / User Libraries. But that had no effect. Do you have any recommendation?

System spec: KNIME 3.2.2 on Windows Server 2008 R2

 

Kind regards

I think you need to specify the location of your preferences file when calling on the command line

Hi swebb,

I just tried it but it failed. I exported them from the GUI enviroment where everything works fine and loaded the file via -preferences. Inspired by your answer that showed me, that the command line options shown in the official FAQ are not all that are possible, I also tried the -vmargs -classpath "path to jar" way. The error remains :/

Additional information: I just tried  a few example workflows from examples server via command line. Everything went fine. But what I actually also recognize is, that the following warning only appears in conjunction with my workflow:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

I didn't manage to find out why this appears only in my workflow.
 

You can ignore this message.