The first thing I would check is the liquibase shell script. It uses or sets a variable LIQUIBASE_HOME - you might add or uncomment some things in that shell script to ensure it is using the locations and jars you think it should be using.
I’ll sometimes change the last few lines of that shell script to look like this:
$MY_CMD
This is basically the same as the default last line, but set into a variable. It has to be quoted, so the existing double quotes have to be escaped. It then echos the command and then executes it, making it easy to see what the classpath being used is.
Hi, I’m using liquibase 3.5.4 on fedora 26, and I trying to use YAML format but I get this error in a update command:
SEVERE 12/04/18 11:53: liquibase: org.yaml.snakeyaml.Yaml
java.lang.NoClassDefFoundError: org/yaml/snakeyaml/Yaml
at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:23)
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:229)
at liquibase.Liquibase.update(Liquibase.java:202)
at liquibase.Liquibase.update(Liquibase.java:192)
at liquibase.integration.commandline.Main.doMigration(Main.java:1130)
at liquibase.integration.commandline.Main.run(Main.java:188)
at liquibase.integration.commandline.Main.main(Main.java:103)
Caused by: java.lang.ClassNotFoundException: org.yaml.snakeyaml.Yaml
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 7 more
I have the file “snakeyaml-1.17.jar” in the lib folder but it seems that is not read. I try to change permissions (read, execution…) but nothing change. In xml format works great.
With version 3.6.1 I have a similar error:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread “main” java.lang.NoClassDefFoundError: ch/qos/logback/core/filter/Filter
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.core.filter.Filter
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 7 more
I also have the corrects files (logback-classic-1.2.3.jar, logback-core-1.2.3.jar, slf4j-api-1.7.25.jar, snakeyaml-1.18.jar) in the lib folder. In this version no command works.