Skip to content

fix(6.3): LanguageToolHttpHandler error: getAbTest() is null

Yann Leretaille requested to merge yannleretaille/languagetool:fix6_3 into main

See upstream bug #9757, which will not be fixed until March 2024.

The LanguageTool server fails to run with the following error:

languagetool[919]: ERROR o.l.server.LanguageToolHttpHandler An error has occurred: 'Cannot invoke "java.util.List.contains(Object)" because the return value of "org.languagetool.server.HTTPServerConfig.getAbTest()" is null', sending HTTP code 500. Access from 127.0.0.1, HTTP user agent: Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0, User agent param: webextension-firefox-ng, v: 8.3.0, Referrer: null, language: auto, h: 2, r: 9, time: 2m: ALL_BUT_TEXTLEVEL_ONLY, l: PICKY, iID: 35716:1701741107422, Stacktrace follows:java.lang.NullPointerException: Cannot invoke "java.util.List.contains(Object)" because the return value of "org.languagetool.server.HTTPServerConfig.getAbTest()" is null

The fix is to simply specify an empty config file in the start options:

ExecStart=/usr/bin/languagetool --http --allow-origin "*" --config /dev/null
Edited by Yann Leretaille

Merge request reports

Loading