termsuite-core icon indicating copy to clipboard operation
termsuite-core copied to clipboard

Unable to run from command line

Open martavillegas opened this issue 6 years ago • 1 comments

Hi, I cannot run the command line as suggested in http://termsuite.github.io/getting-started/#run-terminology-extraction in Ubuntu 18.04.1 LTS

java --version openjdk 10.0.2 2018-07-17 OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4) OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)

this is what I go: $ java -cp termsuite-core-3.0.10.jar fr.univnantes.termsuite.tools.TerminologyExtractorCLI -t ./treetagger/ -c ./wind-energy/English/txt/ -l en --tsv ./wind-energy-en.tsv WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/home/mvillega/Desktop/TERMSUITE_WORKSPACE/termsuite-core-3.0.10.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at java.base/java.lang.Class.getDeclaredFields0(Native Method) at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3014) at java.base/java.lang.Class.getDeclaredFields(Class.java:2207) at org.apache.uima.fit.internal.ReflectionUtil.getFields(ReflectionUtil.java:60) at org.apache.uima.fit.factory.ConfigurationParameterFactory.createConfigurationData(ConfigurationParameterFactory.java:411) at org.apache.uima.fit.factory.ExternalResourceFactory.createExternalResourceDescription(ExternalResourceFactory.java:289) at org.apache.uima.fit.factory.ExternalResourceFactory.createExternalResourceDescription(ExternalResourceFactory.java:232) at fr.univnantes.termsuite.uima.CustomResourceTermSuiteAEFactory.createWordTokenizerAEDesc(CustomResourceTermSuiteAEFactory.java:102) at fr.univnantes.termsuite.framework.PreprocessingPipelineBuilder.create(PreprocessingPipelineBuilder.java:128) at fr.univnantes.termsuite.api.Preprocessor.asService(Preprocessor.java:330) at fr.univnantes.termsuite.api.Preprocessor.asService(Preprocessor.java:284) at fr.univnantes.termsuite.api.Preprocessor.toIndexedCorpus(Preprocessor.java:124) at fr.univnantes.termsuite.tools.TerminologyExtractorCLI.getIndexedCorpus(TerminologyExtractorCLI.java:192) at fr.univnantes.termsuite.tools.TerminologyExtractorCLI.run(TerminologyExtractorCLI.java:136) at fr.univnantes.termsuite.tools.CommandLineClient.launch(CommandLineClient.java:287) at fr.univnantes.termsuite.tools.TerminologyExtractorCLI.main(TerminologyExtractorCLI.java:203) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)

Thanks!

martavillegas avatar Dec 03 '18 09:12 martavillegas

Hi, The error you get java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException is related to the absence of JAXB module removed by Oracle from JDK starting at version 9 ...

So try adding the following java option : --add-modules java.xml.bind

I succeeded by switching back to Java 8 (use SDKMAN on linux for that) and use the latest termsuite-core-3.0.10.jar

Cheers.

mhabsaoui avatar May 27 '19 15:05 mhabsaoui