Skip to content

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

@gmounie

Description

@gmounie

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions