Bug 83906 - BASIC: Problem with LanguageTool 2.6 installation com.sun.star.uno.RuntimeException
Summary: BASIC: Problem with LanguageTool 2.6 installation com.sun.star.uno.RuntimeExc...
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.1.1.2 release
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-15 20:53 UTC by Johnny Baloney
Modified: 2014-09-18 21:32 UTC (History)
2 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 Johnny Baloney 2014-09-15 20:53:07 UTC
Problem description: 

Lost of errors during the installation with the extension manager.
Plugin downloaded from: http://extensions.libreoffice.org/extension-center/languagetool/releases/2.6

Steps to reproduce:
1. Open Extension Manager
2. Click Add... and select LanguageTool-2.6.oxt.
3. Pop-up with error pasted below (1). Attempting to Enable the plugin after the restart of Libre Office results in pop-ups (2) and (1) again.

Expected behaviour:
1. If there are errors display them in a way that is understandable to the end user and provide an explanation to how to fix them not this:
https://www.languagetool.org/images/version-error.jpg

Fix:
1. Go to Tools -> Options -> Advanced and choose Oracle Java 1.7. More explanation can be found on this page:

https://www.languagetool.org/issues/

This link is sadly either not published on the page with the plugin download or not immediately visible.


(1)
(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.defineClass(ClassLoader.java:634)\X000a\X0009at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)\X000a\X0009at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)\X000a\X0009at java.net.URLClassLoader.access$000(URLClassLoader.java:73)\X000a\X0009at java.net.URLClassLoader$1.run(URLClassLoader.java:212)\X000a\X0009at java.security.AccessController.doPrivileged(Native Method)\X000a\X0009at java.net.URLClassLoader.findClass(URLClassLoader.java:205)\X000a\X0009at java.lang.ClassLoader.loadClass(ClassLoader.java:321)\X000a\X0009at java.lang.ClassLoader.loadClass(ClassLoader.java:314)\X000a\X0009at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:615)\X000a\X0009at java.lang.ClassLoader.loadClass(ClassLoader.java:266)\X000a\X0009at com.sun.star.comp.loader.RegistrationClassFinder.find(RegistrationClassFinder.java:55)\X000a\X0009at com.sun.star.comp.loader.JavaLoader.writeRegistryInfo(JavaLoader.java:399)\X000a", Context = (com.sun.star.uno.XInterface) @0 } }

(2)
[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
java stack trace:
java.lang.UnsupportedClassVersionError: org/languagetool/openoffice/Main : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:314)
    at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:615)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    at com.sun.star.comp.loader.RegistrationClassFinder.find(RegistrationClassFinder.java:55)
    at com.sun.star.comp.loader.JavaLoader.writeRegistryInfo(JavaLoader.java:399)
Operating System: Debian
Version: 4.1.1.2 release
Comment 1 Daniel Naber 2014-09-16 19:38:36 UTC
Your version of Java is too old, you need at least Java 7 and it needs to be activated in LO. More details at https://languagetool.org/issues/
Comment 2 Johnny Baloney 2014-09-16 21:29:37 UTC
(In reply to comment #1)
> Your version of Java is too old, you need at least Java 7 and it needs to be
> activated in LO. More details at https://languagetool.org/issues/

Daniel, that's exactly what my bug report says, please read through to the end. The issue here is not if I have too old Java or not, the issue is the incomprehensible and ugly error that is thrown at the user.

There should be a check at the plugin installation time whether the user has the minimum required Java version and a note displayed saying what to do in the case the version does not meet the plugin's requirements.
Comment 3 Jean-Baptiste Faure 2014-09-18 21:15:18 UTC
(In reply to comment #2)
> [...]
> There should be a check at the plugin installation time whether the user has
> the minimum required Java version and a note displayed saying what to do in
> the case the version does not meet the plugin's requirements.

You should report that to the author of this extension. This check is the job of the extension.

Closing as NotOurBug.

Best regards.
Comment 4 Daniel Naber 2014-09-18 21:32:15 UTC
The extension cannot check that, as it's not called yet. See the stacktrace: "com.sun.star.comp.loader.RegistrationClassFinder.find(RegistrationClassFinder.java:55)" - this is where the error is thrown, it's before any exception code is called.