Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Languagetool 6.5 and Debian: -Djdk.xml.totalEntitySizeLimit=2000000 #29

Open
gmounie opened this issue Dec 29, 2024 · 0 comments
Open

Comments

@gmounie
Copy link

gmounie commented Dec 29, 2024

With OpenJDK 24 (Debian sid), and LanguageTool 6.5, the execution seems to hit a limit on the xml decoder (in /etc/java-24-openjdk/jaxp.properties)

It is easily visible with commandline
$ java -version
openjdk version "24-ea" 2025-03-18
OpenJDK Runtime Environment (build 24-ea+29-Debian-1)
OpenJDK 64-Bit Server VM (build 24-ea+29-Debian-1, mixed mode, sharing)
$ java -jar /usr/local/src/LanguageTool-6.5/languagetool-commandline.jar -l fr
...
Caused by: org.xml.sax.SAXParseException; lineNumber: 68; columnNumber: 54354; JAXP00010004: The accumulated size of entities is "100,016" that exceeded the "100,000" limit set by "jaxp.properties".
...

It is working with
java -Djdk.xml.totalEntitySizeLimit=2000000 -jar /usr/local/src/LanguageTool-6.5/languagetool-commandline.jar -l fr

Editing my jaxp.properties to set xml.totalEntitySizeLimit to 2 millions is sufficient but it may be hard to find for common users.

Alternative: passing an optional argument to java (and not to the server)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant