shilad / wikibrain

The WikiBrain Java library enables researchers and developers to incorporate state-of-the-art Wikipedia-based algorithms and technologies in a few lines of code.
http://shilad.github.io/wikibrain/
Other
91 stars 54 forks source link

org.w3c.dom.ls.DocumentLS class missing in packaged .jar #276

Open Barachia opened 5 years ago

Barachia commented 5 years ago

Hi there,

I found there's a missing dependency for the latest version of Wikibrain including the dependencies (0.9.1). I can start the .jar and get the WikiBrain configuration window. However, there's an error I get when I want to run the loader for UK English. There is no class definition for org.w3c.dom.ls.DocumentLS.

org.wikibrain.Loader org.wikibrain.Loader -l UK -s fetchlinks -s download -s dumploader -s redirects -s wikitext -s lucene -s phrases -s concepts -s universal -s wikidata -s spatial -s sr -c customized.conf

 12:46:22.105 [main] INFO  org.wikibrain.core.cmd.Env - Configured default logging at the Info Level
 12:46:22.106 [main] INFO  org.wikibrain.core.cmd.Env - To customize log4j2 set the 'log4j.configurationFile' system property or set EnvBuilder.setReconfigureLogging to false.
 12:46:25.593 [main] INFO  org.wikibrain.conf.Configurator - configurator installed 75 providers for 38 classes
 12:46:25.594 [main] INFO  org.wikibrain.core.cmd.Env - using override configuration files [customized.conf]
 12:46:25.594 [main] INFO  org.wikibrain.core.cmd.Env - using baseDir D:\Data\WikiBrain\.
 12:46:25.594 [main] INFO  org.wikibrain.core.cmd.Env - using max vm heapsize of 4096MB
 12:46:25.596 [main] INFO  org.wikibrain.core.cmd.Env - using languages (UK)
 12:46:25.596 [main] INFO  org.wikibrain.core.cmd.Env - using maxThreads 8
 12:46:25.596 [main] INFO  org.wikibrain.core.cmd.Env - using tmpDir .\.tmp
 Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/dom/ls/DocumentLS
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
    at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802)
    at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700)
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623)
    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:521)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
    at com.jolbox.bonecp.BoneCPConfig.setXMLProperties(BoneCPConfig.java:1387)
    at com.jolbox.bonecp.BoneCPConfig.loadProperties(BoneCPConfig.java:1725)
    at com.jolbox.bonecp.BoneCPConfig.<init>(BoneCPConfig.java:1343)
    at com.jolbox.bonecp.BoneCPDataSource.<init>(BoneCPDataSource.java:81)
    at org.wikibrain.core.dao.sql.WpDataSource$WpDsProvider.get(WpDataSource.java:292)
    at org.wikibrain.core.dao.sql.WpDataSource$WpDsProvider.get(WpDataSource.java:265)
    at org.wikibrain.conf.Configurator.constructInternal(Configurator.java:379)
    at org.wikibrain.conf.Configurator.get(Configurator.java:261)
    at org.wikibrain.conf.Configurator.get(Configurator.java:216)
    at org.wikibrain.core.dao.sql.MetaInfoSqlDao$Provider.get(MetaInfoSqlDao.java:451)
    at org.wikibrain.core.dao.sql.MetaInfoSqlDao$Provider.get(MetaInfoSqlDao.java:429)
    at org.wikibrain.conf.Configurator.constructInternal(Configurator.java:379)
    at org.wikibrain.conf.Configurator.get(Configurator.java:261)
    at org.wikibrain.conf.Configurator.get(Configurator.java:216)
    at org.wikibrain.conf.Configurator.get(Configurator.java:400)
    at org.wikibrain.loader.pipeline.PipelineLoader.<init>(PipelineLoader.java:44)
    at org.wikibrain.Loader.<init>(Loader.java:81)
    at org.wikibrain.Loader.main(Loader.java:121)
 Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ls.DocumentLS
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 29 more

 LOADING FAILED!

However, when running in an IDE with wikibrain as a dependency, there is not an error. Maybe something goes wrong with the inclusion of the xerces package?