Liquibase 4.2.2 JAR CLI yaml issues

I’m having the following issues when trying to run a liquibase update through java -jar liquibase.jar --classpath=postgresql-42.2.18.jar --changeLogFile=database/changelog/db.changelog-master.yaml.

It seems that this is an issue with Liquibase needing snakeyaml in the classpath. However, adding snakeyaml.jar through the --classpath arg or using the java classpath/cp argument does not work as well.

Starting Liquibase at 14:21:52 (version 4.1.1 #10 built at 2020-10-12 19:24+0000)
[2020-12-17 14:21:56] INFO [liquibase.lockservice] Successfully acquired change log lock
[2020-12-17 14:21:56] INFO [liquibase.servicelocator] Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.json.JsonChangeLogParser Unable to get public no-arg constructor
[2020-12-17 14:21:56] INFO [liquibase.servicelocator] Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.yaml.YamlChangeLogParser Unable to get public no-arg constructor
[2020-12-17 14:21:56] INFO [liquibase.lockservice] Successfully released change log lock
Unexpected error running Liquibase: Cannot find parser that supports database/changelog/db.changelog-master.yaml
For more information, please use the --logLevel flag
[2020-12-17 14:21:57] SEVERE [liquibase.integration] Unexpected error running Liquibase: Cannot find parser that supports database/changelog/db.changelog-master.yaml
liquibase.exception.UnknownChangelogFormatException: Cannot find parser that supports database/changelog/db.changelog-master.yaml
at liquibase.parser.ChangeLogParserFactory.getParser(ChangeLogParserFactory.java:55)
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:336)
at liquibase.Liquibase.lambda$update$1(Liquibase.java:229)
at liquibase.Scope.lambda$child$0(Scope.java:160)
at liquibase.Scope.child(Scope.java:169)
at liquibase.Scope.child(Scope.java:159)
at liquibase.Scope.child(Scope.java:138)
at liquibase.Liquibase.runInScope(Liquibase.java:2277)
at liquibase.Liquibase.update(Liquibase.java:215)
at liquibase.Liquibase.update(Liquibase.java:201)
at liquibase.integration.commandline.Main.doMigration(Main.java:1760)
at liquibase.integration.commandline.Main$1.lambda$run$0(Main.java:361)
at liquibase.Scope.lambda$child$0(Scope.java:160)
at liquibase.Scope.child(Scope.java:169)
at liquibase.Scope.child(Scope.java:159)
at liquibase.Scope.child(Scope.java:138)
at liquibase.Scope.child(Scope.java:222)
at liquibase.Scope.child(Scope.java:226)
at liquibase.integration.commandline.Main$1.run(Main.java:360)
at liquibase.integration.commandline.Main$1.run(Main.java:193)
at liquibase.Scope.child(Scope.java:169)
at liquibase.Scope.child(Scope.java:145)
at liquibase.integration.commandline.Main.run(Main.java:193)
at liquibase.integration.commandline.Main.main(Main.java:156)

Hi @alastairparagas,

Looks like a similar issue to this one. Would the fix there work for you?

The fastest way I made it running is by placing driver and yaml jars in jre/lib/ext/ .