myint / language-check

Python wrapper for LanguageTool grammar checker
https://pypi.python.org/pypi/language-check
GNU Lesser General Public License v3.0
327 stars 101 forks source link

NoClassDefFoundError: javax/xml/bind/JAXBException #53

Closed whatamithinking closed 6 years ago

whatamithinking commented 6 years ago

python 3.4 java 9 64-bit

Code I Ran:

import language_check
tool = language_check.LanguageTool( 'en-US' )

Running in console or in sublime text, I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\conno\OneDrive\Desktop\language-check-master\language_check\__init__.py", line 196, in __init__
    self._start_server_on_free_port()
  File "C:\Users\conno\OneDrive\Desktop\language-check-master\language_check\__init__.py", line 333, in _start_server_on_free_port
    cls._start_local_server()
  File "C:\Users\conno\OneDrive\Desktop\language-check-master\language_check\__init__.py", line 377, in _start_local_server
    raise Error(err_msg)
language_check.Error: Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
        at net.loomchild.segment.srx.io.Srx2SaxParser.<init>(Srx2SaxParser.java:173)
        at org.languagetool.tokenizers.SrxTools.createSrxDocument(SrxTools.java:51)
        at org.languagetool.tokenizers.SRXSentenceTokenizer.<init>(SRXSentenceTokenizer.java:53)
        at org.languagetool.tokenizers.SimpleSentenceTokenizer.<init>(SimpleSentenceTokenizer.java:37)
        at org.languagetool.Language.<clinit>(Language.java:60)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Unknown Source)
        at org.languagetool.Languages.createLanguageObjects(Languages.java:111)
        at org.languagetool.Languages.getAllLanguages(Languages.java:97)
        at org.languagetool.Languages.<clinit>(Languages.java:39)
        at org.languagetool.language.LanguageIdentifier.getLanguageCodes(LanguageIdentifier.java:77)
        at org.languagetool.language.LanguageIdentifier.<init>(LanguageIdentifier.java:64)
        at org.languagetool.server.LanguageToolHttpHandler.<init>(LanguageToolHttpHandler.java:85)
        at org.languagetool.server.HTTPServer.<init>(HTTPServer.java:99)
        at org.languagetool.server.HTTPServer.main(HTTPServer.java:145)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        ... 15 more
whatamithinking commented 6 years ago

Delete java 9 and install java 8. Oracle moved some stuff around in java 9 and that is messing up language_check.