Not loading SnakeYAML?

Hi, when I run the command listed at the top of this output, I get the rest:

  1. liquibase --changeLogFile=db.cams.yaml --classpath=snakeyaml-1.12.jar  update

  2. INFO 11/06/13 12:18:liquibase: Successfully acquired change log lock
  3. INFO 11/06/13 12:18:liquibase: Successfully released change log lock
  4. Liquibase update Failed: org.yaml.snakeyaml.Yaml
  5. SEVERE 11/06/13 12:18:liquibase: org.yaml.snakeyaml.Yaml
  6. java.lang.NoClassDefFoundError: org/yaml/snakeyaml/Yaml
  7.         at liquibase.parser.core.yaml.YamlChangeLogParser.parse(
  8.         at liquibase.Liquibase.update(
  9.         at liquibase.integration.commandline.Main.doMigration(
  10.         at liquibase.integration.commandline.Main.main(
  11. Caused by: java.lang.ClassNotFoundException: org.yaml.snakeyaml.Yaml
  12.         at$
  13.         at$
  14.         at Method)
  15.         at
  16.         at java.lang.ClassLoader.loadClass(
  17.         at sun.misc.Launcher$AppClassLoader.loadClass(
  18.         at java.lang.ClassLoader.loadClass(
  19.         ... 4 more

snakeyaml-1.12.jar is in the current working directory. If I try with --classpath=boo:

  1. Liquibase update Failed: C:\w\juno\CAMS\CAMSLogicClient\resources\boo does not exist
  2. SEVERE 11/06/13 12:23:liquibase: C:\w\juno\CAMS\CAMSLogicClient\resources\boo does not exist
  3. liquibase.exception.CommandLineParsingException: C:\w\juno\CAMS\CAMSLogicClient\
  4. resources\boo does not exist
  5.         at liquibase.integration.commandline.Main.configureClassLoader(
  6.         at liquibase.integration.commandline.Main.main(

So Liquibase is clearly finding the JAR. I’ve looked inside the JAR and org/yaml/snakeyaml/Yaml.class exists.

Has anyone got this working please?

The problem is because the classpath liquibase parameter sets a sub-classloader whereas snakeyaml needs to be in the classloader that is running liqubase itself.

If you add snakeyaml to a new “lib” dir within the liquibase directory it will find it automatically without having to reference it. There is a bug that is resolved in the next release to include snakeyaml in that dir automatically.


That’s got it, thanks Nathan.


I am facing the same issue. I tried creating lib dir but still not working.

I am using liquibase 3.5.3.