dice-group / LIMES

Link Discovery Framework for Metric Spaces.
https://limes.demos.dice-research.org/
GNU Affero General Public License v3.0
126 stars 54 forks source link

LIMES does not work anymore: java.lang.NoClassDefFoundError #272

Closed vemonet closed 2 years ago

vemonet commented 2 years ago

Hi, I don't think LIMES works anymore since the new release to update to the latest log4j

It seems like the problem comes again from log4j (this library is really the worst piece of software in the history of software)

I am running it with Java 11:

openjdk version "11.0.9.1-internal" 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1-internal+0-adhoc..src)
OpenJDK 64-Bit Server VM (build 11.0.9.1-internal+0-adhoc..src, mixed mode)

Here is the command:

java -jar limes-core-1.7.6-SNAPSHOT.jar limes-dbpedia.xml
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/util/ReflectionUtil
    at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:42)
    at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
    at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
    at org.aksw.limes.core.controller.Controller.main(Controller.java:75)
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.util.ReflectionUtil
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 6 more

Asking for the help with -h create the same issue:

java -jar limes-core-1.7.6-SNAPSHOT.jar -h                                                                                          1 ↵
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/util/ReflectionUtil
    at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:42)
    at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
    at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
    at org.aksw.limes.core.controller.Controller.main(Controller.java:75)
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.util.ReflectionUtil
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 6 more

Funnily I managed to get an answer by asking for --help (even if your docs say to use -h, only --help works apparently)

java -jar limes-core-1.7.6-SNAPSHOT.jar --help
Parsing error:
    Unrecognized option: --help
usage: limes [OPTION]... <config_file_or_uri>
 -1         Force 1-to-1 mappings, i.e. for each source resource only keep
            the link with the highest probability.
 -d <arg>   Configure path for the statistics JSON output file.
 -f <arg>   Optionally configure format of <config_file_or_uri>, either
            "xml" (default) or "rdf". If not specified, LIMES tries to
            infer the format from file ending.
 -F <arg>   Optionally configure format of gold standard file, wither
            "csv" (default), "tab" or "rdf". Only effective in combination
            with -g option.
 -g <arg>   Compute P,R,F for the resulting mapping compared to a gold
            standard file given as an argument to this option.
 -h         Show this help
 -l <arg>   Optionally configure a limit for source and target resources
            processed by LIMES Server. Only effective if -s is specified.
            Default value is -1 (no limit).
 -o <arg>   Set path of log file. Default is 'limes.log'
 -p <arg>   Optionally configure HTTP server port. Only effective if -s is
            specified. Default port is 8080.
 -s         Run LIMES Server

Any idea how this can be fixed? @KonradHoeffner @kvndrsslr @abdullahfathi because it seems like LIMES is completely broken for everyone right now (cf. other issue related to same error in docker)

KonradHoeffner commented 2 years ago

The related issue for the same error when using Docker is https://github.com/dice-group/LIMES/issues/271. Should those issues be merged?

MSherif commented 2 years ago

We are working on it

vemonet commented 2 years ago

Thanks a lot!

I'll close this issue then and follow the resolution through https://github.com/dice-group/LIMES/issues/272 and https://github.com/dice-group/LIMES/pull/273