Bug 166883 - Java XML error in LanguageTool 6.4
Summary: Java XML error in LanguageTool 6.4
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.3.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-06 17:30 UTC by Dirk Munk
Modified: 2025-07-02 07:49 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Munk 2025-06-06 17:30:11 UTC
I just installed LIbreOffice 25.2.4.3 and Java 24.0.1 on Windows 11.

After starting up Writer for the first time I got a very big error message from LanguageTool 6.4, and the cause of the error was jdk.xml.totalentitysizelimit exceeded.

The limit was given as 100,000, and a value of 100,018 was measured. 

LanguageTools automated reply sent me toe LibreOffice.
Comment 1 fpy 2025-06-11 09:13:35 UTC
(In reply to Dirk Munk from comment #0)

> LanguageTools automated reply sent me toe LibreOffice.

so kind of them :|

an apparent WKA is to downgrade your JDK :
https://forum.languagetool.org/t/error-recently-arch-linux-upgraded-jdk-openjdk-to-v-24-u36-1/11162/6
Comment 2 Dirk Munk 2025-06-11 21:54:44 UTC
Well, according to this page:

https://docs.oracle.com/javase/tutorial/jaxp/limits/limits.html

the default limit for totalEntitySizeLimit is much higher, so why was it limited to 100,000?
Comment 3 fpy 2025-06-12 05:22:34 UTC
(In reply to Dirk Munk from comment #2)
> Well, according to this page:
> 

well, maybe read the disclaimer at the top of the page :|

       The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available.
        See Dev.java for updated tutorials taking advantage of the latest releases.
        See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.
        See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.


> why
>

"adjustments" -> https://bugs.openjdk.org/browse/JDK-8343004
Comment 4 Dirk Munk 2025-06-15 21:53:51 UTC
I looked at the latest documentation:
https://docs.oracle.com/javase/tutorial/jaxp/limits/limits.html

The default value for jdk.xml.totalentitysizelimit is 50000000 .

I also found this page:
https://docs.oracle.com/en/java/javase/24/security/java-api-xml-processing-jaxp-security-guide.html#GUID-6E76FE41-A8C5-4F56-AB46-83A89B1E904A

And there is an example of how to set jdk.xml.totalentitysizelimit to 100000 .

Is that a coincident? I doubt it.

The Languagetools guys told me that the Languagetool extension of Libreoffice is made by LibreOffice, so someone at LibreOffice has to increase the value of the jdk.xml.totalentitysizelimit parameter to let's say 200000, and rebuild the extension.

Can't be very difficult ??
Comment 5 fpy 2025-06-25 19:36:56 UTC
(In reply to Dirk Munk from comment #4)
> I looked at the latest documentation

again (and last) : "maybe read the disclaimer at the top of the page"

> The Languagetools guys told me 

glad you have private first hand info.
maybe it would be publicly written somewhere then ?

like here : https://languagetool.org/insights/post/product-libreoffice/ ?

> Languagetool extension 

what "extension" ?


> someone at LibreOffice 

again, would be useful to clarify what this may mean.
make your own idea how easy it is : https://community.documentfoundation.org/t/developer-hiring-proposals/13043/56

> Can't be very difficult ??

shall it be correct ...
Comment 6 Dirk Munk 2025-06-27 18:26:19 UTC
OK, I figured it out.

The LanguageTool 6.4 extension that I have came from the LibreOffice extension repository, it is still there. 

However, the extension is no longer supported, it has been replaced by the WritingTool extension that is based on LanguageTool 6.5.

Both extensions come from the LibreOffice community I suppose. 

It is also possible to use the on-line LanguageTool server, but that only works if you are working on-line. 

So I will remove LanguageTool 6.4, and replace it by WritingTool.