Search code examples
silktest

How can I run a Silk4J test from the command line?


I have read the official MicroFocus article "How can I run a Silk4J test from the command line?" but doing as described results in the message

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/Logger
        at org.apache.logging.slf4j.SLF4JLoggerContext.getLogger(SLF4JLoggerContext.java:41)

So it seems there are more JARs to be added to the class path than described in the article, which is from 2013.


Solution

  • It turns out I had too many JAR files in my classpath.

    Removing the following JARs enhanced the situation:

    • log4j-to-slf4j-2.0.2.jar
    • log4j-to-slf4j-2.0.2-javadoc.jar
    • log4j-to-slf4j-2.0.2-sources.jar
    • log4j-slf4j-impl-2.0.2.jar
    • log4j-slf4j-impl-2.0.2-javadoc.jar
    • log4j-slf4j-impl-2.0.2-sources.jar

    (where the JavaDoc and Sources were probably not an issue).