简体   繁体   English

找出缺少的课程

[英]find out which class is missing

I was trying to install liquibase on my CentOS 6.9 it needs java (i have openjdk version "1.8.0_121" ) but i got this error: 我试图在我的CentOS 6.9上安装liquibase,它需要Java(我的openjdk version "1.8.0_121" ),但出现此错误:

  [root@sampleliquibase-3.6.2-bin..z]# ll
  total 11412
  drwxrwxrwx. 2 db2inst1 db2iadm1    4096 Dec 17 13:10 lib
 -rwxrwxrwx. 1 db2inst1 db2iadm1   11358 Jul  3 23:27 LICENSE.txt
 -rwxrwxrwx. 1 db2inst1 db2iadm1    1251 Jul  3 23:27 liquibase
 -rwxrwxrwx. 1 db2inst1 db2iadm1 9406606 Dec 17 09:42 liquibase-3.6.2- 
  bin.zip
 -rwxrwxrwx. 1 db2inst1 db2iadm1     884 Jul  3 23:27 liquibase.bat
 -rwxrwxrwx. 1 db2inst1 db2iadm1 2167086 Jul  3 23:30 liquibase.jar
 -rwxrwxrwx. 1 db2inst1 db2iadm1    7174 Jul  3 23:27 liquibase.spec
 -rwxrwxrwx. 1 db2inst1 db2iadm1    3046 Jul  3 23:27 README.txt
 drwxrwxrwx. 6 db2inst1 db2iadm1    4096 Dec 17 13:10 sdk
 -rwxrwxrwx. 1 root     root       41203 Mar 16  2017 slf4j-api-1.7.25.jar
 [root@sampleliquibase-3.6.2-bin..z]# java -jar liquibase.jar
 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:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 7 more
    [root@sampleliquibase-3.6.2-bin..z]#

I think some kind of class is missing but i dont know which one is and how i can add it to java classes. 我认为缺少某种类,但是我不知道哪种类以及如何将其添加到Java类中。 what should I do? 我该怎么办?

ch/qos/logback/core/filter/Filter

aka 又名

ch.qos.logback.core.filter.Filter

is missing which is part of Logback, you can add it to the application using your buildscript. 如果缺少Logback的一部分,则可以使用buildscript将其添加到应用程序中。 Or manually install it to your lib folder from https://mvnrepository.com/artifact/ch.qos.logback/logback-core 或从https://mvnrepository.com/artifact/ch.qos.logback/logback-core手动将其安装到您的lib文件夹中

Maybe you are launching the wrong file. 也许您正在启动错误的文件。 Instead of running the jar directly you might have to run the "launcher" script instead. 您可能必须运行“启动程序”脚本,而不是直接运行jar。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM