用命令行无法运行liquibase [英] Cant run liquibase with command line
问题描述
我想使用liquibase,但是当我想让它与命令行一起运行时,会发生这种情况:
I want to use liquibase but when I want to let it run with command line this happens:
PS C:\Users\Ferid\Downloads\liquibase-3.6.0-bin> .\liquibase
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(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.core.filter.Filter
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more
我尝试了liquibase-3.6.1,现在尝试了liquibase-3.6.0
I have tried liquibase-3.6.1 and now liquibase-3.6.0
推荐答案
库文件夹中缺少所需的库之一。
One of the required libraries is missing from the library folder.
请参见下面的错误报告链接,其中另一个用户存在相同的问题。
See the bug report link below where another user had the same issue.
似乎3.6.1仍缺少slf4j-api-1.7 .25在lib文件夹
中,我仍然收到通过cli调用liquibase的错误。
It appears 3.6.1 is still missing slf4j-api-1.7.25 in the lib folder and I still receive an error invoking liquibase via cli.
您有三个选择:
- 亲自获取库 [这里] 。
- 等待已修补的
版本(也许自己提交修复程序)。 - 还原到旧版本(3.5.5应该可以)
- Get the library yourself [here].
- Wait for the patched version (Maybe submit a fix yourself).
- Revert to an older version (3.5.5 Should work)
有关错误报告,请参见此处:
https://liquibase.jira.com/browse/CORE-3201
See here for the bug report: https://liquibase.jira.com/browse/CORE-3201
这篇关于用命令行无法运行liquibase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!