Open chimney37 opened 6 years ago
Problem Summary: Call to java has dependency error. It seems to be a problem on Java 9.
Reference: https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j
Proposed Solution: In LanguageTool.vim, around line 256: let l:languagetool_cmd = 'java'... before '-jar', add: \ . ' --add-modules java.xml.bind'
Error detected while processing function 13_LanguageToolCheck: line 41: Command [java -jar /usr/local/Cellar/languagetool/3.9/libexec/languagetool-commandline.jar -c utf-8 -d WHITESPACE_RULE,EN_QUOTES -l en --api /var/folders/t9/k5qyymjd5ns4slbdt03t9jnc0000gp/T/vXpuyoT/6 2> / var/folders/t9/k5qyymjd5ns4slbdt03t9jnc0000gp/T/vXpuyoT/7] failed with error: 1 line 44: ['Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException', '^Iat net. loomchild.segment.srx.io.Srx2SaxParser.(Srx2SaxParser.java:173)', '^Iat org.languagetool.tokeniz ers.SrxTools.createSrxDocument(SrxTools.java:51)', '^Iat org.languagetool.tokenizers.SRXSentenceTokeni zer.(SRXSentenceTokenizer.java:53)', '^Iat org.languagetool.tokenizers.SimpleSentenceTokenizer.< init>(SimpleSentenceTokenizer.java:37)', '^Iat org.languagetool.Language.(Language.java:60)', '^Iat java.base/java.lang.Class.forName0(Native Method)', '^Iat java.base/java.lang.Class.forName(Clas s.java:292)', '^Iat org.languagetool.Languages.createLanguageObjects(Languages.java:110)', '^Iat org.l anguagetool.Languages.getAllLanguages(Languages.java:96)', '^Iat org.languagetool.Languages.(L anguages.java:38)', '^Iat org.languagetool.commandline.CommandLineParser.getLanguage(CommandLineParser .java:226)', '^Iat org.languagetool.commandline.CommandLineParser.parseOptions(CommandLineParser.java: 89)', '^Iat org.languagetool.commandline.Main.main(Main.java:379)', 'Caused by: java.lang.ClassNotFoun dException: javax.xml.bind.JAXBException', '^Iat java.base/jdk.internal.loader.BuiltinClassLoader.load Class(BuiltinClassLoader.java:582)', '^Iat java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.l oadClass(ClassLoaders.java:185)', '^Iat java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496
Perhaps a pull request to make the language tool command customizable would be accepted?
Problem Summary: Call to java has dependency error. It seems to be a problem on Java 9.
Reference: https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j
Proposed Solution: In LanguageTool.vim, around line 256: let l:languagetool_cmd = 'java'... before '-jar', add: \ . ' --add-modules java.xml.bind'
Error detected while processing function13_LanguageToolCheck:
line 41:
Command [java -jar /usr/local/Cellar/languagetool/3.9/libexec/languagetool-commandline.jar -c utf-8 -d
WHITESPACE_RULE,EN_QUOTES -l en --api /var/folders/t9/k5qyymjd5ns4slbdt03t9jnc0000gp/T/vXpuyoT/6 2> /
var/folders/t9/k5qyymjd5ns4slbdt03t9jnc0000gp/T/vXpuyoT/7] failed with error: 1
line 44:
['Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException', '^Iat net.
loomchild.segment.srx.io.Srx2SaxParser.(Srx2SaxParser.java:173)', '^Iat org.languagetool.tokeniz
ers.SrxTools.createSrxDocument(SrxTools.java:51)', '^Iat org.languagetool.tokenizers.SRXSentenceTokeni
zer.(SRXSentenceTokenizer.java:53)', '^Iat org.languagetool.tokenizers.SimpleSentenceTokenizer.<
init>(SimpleSentenceTokenizer.java:37)', '^Iat org.languagetool.Language.(Language.java:60)',
'^Iat java.base/java.lang.Class.forName0(Native Method)', '^Iat java.base/java.lang.Class.forName(Clas
s.java:292)', '^Iat org.languagetool.Languages.createLanguageObjects(Languages.java:110)', '^Iat org.l
anguagetool.Languages.getAllLanguages(Languages.java:96)', '^Iat org.languagetool.Languages.(L
anguages.java:38)', '^Iat org.languagetool.commandline.CommandLineParser.getLanguage(CommandLineParser
.java:226)', '^Iat org.languagetool.commandline.CommandLineParser.parseOptions(CommandLineParser.java:
89)', '^Iat org.languagetool.commandline.Main.main(Main.java:379)', 'Caused by: java.lang.ClassNotFoun
dException: javax.xml.bind.JAXBException', '^Iat java.base/jdk.internal.loader.BuiltinClassLoader.load
Class(BuiltinClassLoader.java:582)', '^Iat java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.l
oadClass(ClassLoaders.java:185)', '^Iat java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496