Hello everybody,
I’m sorry to bother you, but in short, I can’t use a self-hosted LanguageTool server with Google Chrome add-on.
It works if I choose the languagetool.org server.
It works perfectly under Firefox.
I don’t know what I’m doing wrong, maybe someone can light me up.
Thank you!
I tried each of the following methods, to start the server :
java -cp ./LanguageTool-6.3/languagetool-server.jar org.languagetool.server.HTTPServer --port 8081
java -cp ./LanguageTool-6.3/languagetool-server.jar org.languagetool.server.HTTPServer --port 8081 --allow-origin “*”
java -cp ./LanguageTool-6.3/languagetool-server.jar org.languagetool.server.HTTPServer --port 8081 --allow-origin
I also tried starting the GUI, and turning on the server option.
I tried under Windows, and Debian.
I also tried behind a reverse proxy, using TLS.
Every time, I get the same problem (only with the Google Chrome add-on).
Here is the error message that appears in the terminal:
INFO org.languagetool.server.DatabaseAccessOpenSource Not setting up database access, dbDriver is not configured
Setting up thread pool with 10 threads
WARN: no common words file defined for Japanese - this language might not be correctly auto-detected
WARN: no common words file defined for Khmer - this language might not be correctly auto-detected
Starting LanguageTool 6.3 (build date: 2023-10-06 20:34:38 +0000, fb238b2) server on http://localhost:8081…
Server started
INFO org.languagetool.server.LanguageToolHttpHandler Handling POST /v2/check
INFO org.languagetool.server.LanguageToolHttpHandler Handling POST /v2/check
ERROR org.languagetool.server.LanguageToolHttpHandler An error has occurred: ‘null’, sending HTTP code 500. Access from 127.0.0.1, HTTP user agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36, User agent param: webextension-chrome-ng, v: 8.3.0, Referrer: null, language: auto, h: 2, r: 2, time: 202m: TEXTLEVEL_ONLY, l: PICKY, iID: 19844:1701038232798, Stacktrace follows:java.lang.NullPointerException
at org.languagetool.server.TextChecker.checkText(TextChecker.java:376)
at org.languagetool.server.ApiV2.handleCheckRequest(ApiV2.java:176)
at org.languagetool.server.ApiV2.lambda$handleRequest$4(ApiV2.java:86)
at org.languagetool.tools.TelemetryProvider.createSpan(TelemetryProvider.java:96)
at org.languagetool.server.ApiV2.handleRequest(ApiV2.java:86)
at org.languagetool.server.LanguageToolHttpHandler.lambda$handle$0(LanguageToolHttpHandler.java:202)
at org.languagetool.tools.TelemetryProvider.createSpan(TelemetryProvider.java:96)
at org.languagetool.server.LanguageToolHttpHandler.handle(LanguageToolHttpHandler.java:202)
at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77)
at jdk.httpserver/sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:82)
at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:80)
at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:848)
at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77)
at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:817)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
ERROR org.languagetool.server.LanguageToolHttpHandler An error has occurred: ‘null’, sending HTTP code 500. Access from 127.0.0.1, HTTP user agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36, User agent param: webextension-chrome-ng, v: 8.3.0, Referrer: null, language: auto, h: 2, r: 2, time: 202m: ALL_BUT_TEXTLEVEL_ONLY, l: PICKY, iID: 19844:1701038232798, Stacktrace follows:java.lang.NullPointerException
at org.languagetool.server.TextChecker.checkText(TextChecker.java:376)
at org.languagetool.server.ApiV2.handleCheckRequest(ApiV2.java:176)
at org.languagetool.server.ApiV2.lambda$handleRequest$4(ApiV2.java:86)
at org.languagetool.tools.TelemetryProvider.createSpan(TelemetryProvider.java:96)
at org.languagetool.server.ApiV2.handleRequest(ApiV2.java:86)
at org.languagetool.server.LanguageToolHttpHandler.lambda$handle$0(LanguageToolHttpHandler.java:202)
at org.languagetool.tools.TelemetryProvider.createSpan(TelemetryProvider.java:96)
at org.languagetool.server.LanguageToolHttpHandler.handle(LanguageToolHttpHandler.java:202)
at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77)
at jdk.httpserver/sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:82)
at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:80)
at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:848)
at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77)
at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:817)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
INFO org.languagetool.server.LanguageToolHttpHandler Handled request in 230ms; sending code 500
INFO org.languagetool.server.LanguageToolHttpHandler Handled request in 230ms; sending code 500