Bug 75051 - Extension: LanguageTool 2.4 not working with stable LO release
Summary: Extension: LanguageTool 2.4 not working with stable LO release
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
4.1.3.2 release
Hardware: Other Mac OS X (All)
: medium major
Assignee: Not Assigned
URL: http://extensions.libreoffice.org/ext...
Whiteboard: confirmed:4.2.1.1:OSX
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-16 11:55 UTC by roelandvancutsem
Modified: 2017-10-13 15:21 UTC (History)
4 users (show)

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 roelandvancutsem 2014-02-16 11:55:11 UTC
My LibreOffice:
Version: 4.1.3.2
Build ID: 410m0(Build:2)

This extension doesn't work with it:
http://extensions.libreoffice.org/extension-center/languagetool/releases/2.4


The LibreOffice is the newest version for this newest language package! !



I use Mint 16.
Comment 1 retired 2014-03-02 10:10:12 UTC
Confirmed:4.2.1.1:OSX

When I try to install Language Tool 2.4 in LO 4.2.1.1 on OSX 10.9.2 I get the following error.

This is an important extension

(com.sun.star.uno.RuntimeException) { { Message = "[jni_uno bridge error] UNO calling Java method writeRegistryInfo: non-UNO exception occurred: java.lang.UnsupportedClassVersionError: org/languagetool/openoffice/Main : Unsupported major.minor version 51.0\X000ajava stack trace:\X000ajava.lang.UnsupportedClassVersionError: org/languagetool/openoffice/Main : Unsupported major.minor version 51.0\X000a\X0009at java.lang.ClassLoader.defineClass1(Native Method)\X000a\X0009at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)\X000a\X0009at java.lang.ClassLoader.defineClass(ClassLoader.java:621)\X000a\X0009at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)\X000a\X0009at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)\X000a\X0009at java.net.URLClassLoader.access$000(URLClassLoader.java:58)\X000a\X0009at java.net.URLClassLoader$1.run(URLClassLoader.java:197)\X000a\X0009at java.security.AccessController.doPrivileged(Native Method)\X000a\X0009at java.net.URLClassLoader.findClass(URLClassLoader.java:190)\X000a\X0009at java.lang.ClassLoader.loadClass(ClassLoader.java:306)\X000a\X0009at java.lang.ClassLoader.loadClass(ClassLoader.java:295)\X000a\X0009at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:627)\X000a\X0009at java.lang.ClassLoader.loadClass(ClassLoader.java:247)\X000a\X0009at com.sun.star.comp.loader.RegistrationClassFinder.find(RegistrationClassFinder.java:52)\X000a\X0009at com.sun.star.comp.loader.JavaLoader.writeRegistryInfo(JavaLoader.java:399)\X000a", Context = (com.sun.star.uno.XInterface) @0 } }

Jave 1.6 and 1.7 installed.

LO really needs to learn to deal with extensions (both broken and working) and extension website should show if an extension is compatible with the latest stable LO release. There should be a voting option for users to reflect compatibility:

http://s7.directupload.net/images/140302/ypwernas.png

I'm raising this here to "high" since this is an often used extension and the current situation makes for a very bad user experience. Please correct me if that is a wrong assumption.

This problem here is a mixture of several existing other issues:

I was able to install LanguageTool after selecting Jave 1.7 in Preferences > LibreOffice > Extended.

Since LanguageTool 2.4 requires LibreOffice to run LO and Java in 64 bit both a LibreOffice 64bit and java 1.7 (as well 64bit) are required.

@Roeland: Are there any 64bit LO builds for Linux? Could you please check and make sure both your java and LO are 64 bit and report back if then Language Tool 2.4 does install.
Comment 2 roelandvancutsem 2014-03-02 16:53:16 UTC
@Roeland: Are there any 64bit LO builds for Linux? YES
Java 64? I think so, because Java works the few games I have for.
Comment 3 retired 2014-03-02 22:40:14 UTC
So you are on LO 4.2.1.1 Jave 1.7 update 51? and language tool 2.4 still won't install?
Comment 4 QA Administrators 2014-10-05 23:05:39 UTC Comment hidden (obsolete)
Comment 5 Daniel Naber 2014-10-15 13:38:46 UTC
I'd suggest to close this bug, "Unsupported major.minor version 51.0" indicates that an old version of Java (< 1.7) was used. LT requires Java 1.7 or later.
Comment 6 retired 2014-10-17 16:03:52 UTC
Java 8 Update 25
OSX 10.10
LanguageTool 2.7
LO 4.3.2.2

Trying to add this extension gives the following error:

(com.sun.star.lang.DisposedException) { { { Message = "Binary URP bridge disposed during call", Context = (com.sun.star.uno.XInterface) @11ce69800 } } }

Thus, setting this bug to NEW.
Comment 7 Daniel Naber 2014-10-17 16:22:20 UTC
Did you make sure to try all the suggestions on https://languagetool.org/issues/?
Comment 8 retired 2014-10-17 16:56:44 UTC
Tried latest nightly, same error.

Jave info message opens telling me to install java 1.6, which I will not do. Java 1.8 is out.

So this is either a LO or a LT bug. And it's very real.
Comment 9 Ricky Charlet 2014-11-29 21:37:00 UTC
Just wanted to chime in that I can reproduce it too. It seems blindingly obvious on the "how to reproduce" score... 

(out of band... download Language Extension 2.7)
open LO 4.2.X
open Tools:Extension Manager
using Extension Manager: `Add` Language Extension 2.7.

I get this error:
(com.sun.star.uno.RuntimeException) { { Message = "[jni_uno bridge error] UNO calling Java method writeRegistryInfo: non-UNO exception occurred: java.lang.UnsupportedClassVersionError: org/languagetool/openoffice/Main : Unsupported major.minor version 51.0\X000ajava stack trace:\X000ajava.lang.UnsupportedClassVersionError: org/languagetool/openoffice/Main : Unsupported major.minor version 51.0\X000a\X0009at java.lang.ClassLoader.defineClass1(Native Method)\X000a\X0009at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)\X000a\X0009at java.lang.ClassLoader.defineClass(ClassLoader.java:621)\X000a\X0009at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)\X000a\X0009at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)\X000a\X0009at java.net.URLClassLoader.access$000(URLClassLoader.java:58)\X000a\X0009at java.net.URLClassLoader$1.run(URLClassLoader.java:197)\X000a\X0009at java.security.AccessController.doPrivileged(Native Method)\X000a\X0009at java.net.URLClassLoader.findClass(URLClassLoader.java:190)\X000a\X0009at java.lang.ClassLoader.loadClass(ClassLoader.java:306)\X000a\X0009at java.lang.ClassLoader.loadClass(ClassLoader.java:295)\X000a\X0009at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:627)\X000a\X0009at java.lang.ClassLoader.loadClass(ClassLoader.java:247)\X000a\X0009at com.sun.star.comp.loader.RegistrationClassFinder.find(RegistrationClassFinder.java:52)\X000a\X0009at com.sun.star.comp.loader.JavaLoader.writeRegistryInfo(JavaLoader.java:399)\X000a", Context = (com.sun.star.uno.XInterface) @0 } }
Comment 10 steve -_- 2015-07-13 08:37:36 UTC
OS → all since this was reported for OSX as well, so atm Linux + OS X
Comment 11 QA Administrators 2016-09-20 10:14:04 UTC Comment hidden (obsolete)
Comment 12 steve -_- 2016-09-27 09:32:01 UTC
Hm I can't install Language Tool 3.4 in todays master under 10.12.

Might be a combination of this bug here and https://bugs.documentfoundation.org/show_bug.cgi?id=99784 as I am seeing a freeze.
Comment 13 Alex Thurgood 2017-09-28 09:33:44 UTC
The latest release version 3.9 installs just fine on :

Version: 6.0.0.0.alpha0+
Build ID: 4bf3b4ee48c4e3556e257aa77940f68c13b05b54
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group
Comment 14 Alex Thurgood 2017-09-28 11:40:17 UTC
In my master build LO 6.0 alpha, LanguageTool fails to initialize with Java9 :


java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
	at net.loomchild.segment.srx.io.Srx2SaxParser.<init>(Srx2SaxParser.java:173)
	at org.languagetool.tokenizers.SrxTools.createSrxDocument(SrxTools.java:51)
	at org.languagetool.tokenizers.SRXSentenceTokenizer.<init>(SRXSentenceTokenizer.java:53)
	at org.languagetool.tokenizers.SimpleSentenceTokenizer.<init>(SimpleSentenceTokenizer.java:37)
	at org.languagetool.Language.<clinit>(Language.java:60)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:292)
	at org.languagetool.Languages.createLanguageObjects(Languages.java:110)
	at org.languagetool.Languages.getAllLanguages(Languages.java:96)
	at org.languagetool.Languages.<clinit>(Languages.java:38)
	at org.languagetool.openoffice.Main.getLocales(Main.java:552)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
	... 11 more
java.lang.NoClassDefFoundError: Could not initialize class org.languagetool.Languages
	at org.languagetool.openoffice.Main.getLocales(Main.java:552)
Comment 15 Alex Thurgood 2017-09-28 11:41:36 UTC
(In reply to Alex Thurgood from comment #14)

Seems that this tool requires updating to take into account Java9...
Comment 16 Daniel Naber 2017-09-28 11:47:25 UTC
Please see https://forum.languagetool.org/t/lt-and-java-9/1588 for information about LT and Java 9.
Comment 17 Alex Thurgood 2017-09-28 11:52:53 UTC
(In reply to Daniel Naber from comment #16)
> Please see https://forum.languagetool.org/t/lt-and-java-9/1588 for
> information about LT and Java 9.

Thanks, but how exactly does that translate to getting it to work in LibreOffice for Mac ? If I understand that thread correctly, it is a known bug, currently not fixed.
Comment 18 Daniel Naber 2017-09-28 12:05:52 UTC
The LO dialog that lets you select the JDK has a "Parameters..." button. You should be able to add "--add-modules java.xml.bind" there (but I haven't tested it with Java 9).
Comment 19 Alex Thurgood 2017-09-28 12:46:52 UTC
(In reply to Daniel Naber from comment #18)
> The LO dialog that lets you select the JDK has a "Parameters..." button. You
> should be able to add "--add-modules java.xml.bind" there (but I haven't
> tested it with Java 9).

Unfortunately that doesn't work, having just tried it and various variants :

- as above, including the quotation marks ;
- as above, without the quotation marks;
- as above, but appending JAXBException after bind.

None of these worked I'm afraid.
Comment 20 Jan-Marek Glogowski 2017-10-13 14:47:01 UTC
(In reply to Daniel Naber from comment #18)
> The LO dialog that lets you select the JDK has a "Parameters..." button. You
> should be able to add "--add-modules java.xml.bind" there (but I haven't
> tested it with Java 9).

Works for me. Actually you have to add "--add-modules=java.xml.bind". Without the equal sign you can't add the parameter to the VM.

But this is really just a workaround, as LanguageTool has to fix its dependencies for Java 9, but this is not our bug.

Just a reminder that this generally just works with recent 6.0, because of bug 99784.
Comment 21 Alex Thurgood 2017-10-13 15:02:33 UTC
Confirming that this also now works for me with

Version: 6.0.0.0.alpha0+
Build ID: 643e9001bff137b6e5a8784d9e1f25a51e0d1644
CPU threads: 4; OS: Mac OS X 10.13; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group

and Jan-Marek's tip on adding the parameter. Excellent !