Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#895440: jabref: [~Unable to connect to libreoffice

82 views
Skip to first unread message

D Haley

unread,
Apr 11, 2018, 10:20:03 AM4/11/18
to
Package: jabref
Version: 3.8.1+ds-3
Severity: normal

Dear Maintainer,

The Libreoffice "connect" feature does not appear to work in this version
of jabref by default.

The "manual connect" feature [1][2] fails as it is looking for several
.jar files:

unoil.jar
jurt.jar
juh.jar
ridl.jar

These files are located in some of these folders (but not all):
/usr/share/java/
/usr/lib/libreoffice/program/classes/
/usr/share/libreoffice/program/classes/

which are not in the default paths listed by the program.

Furthermore, as jabref insists on appending "program/classes/" to
any path that you specify, you can only access them by supplying
"/usr/lib/libreoffice/" as the path. Using /usr/share/java/ or
/usr/share/libreoffice/ does not work, as not all jars are in these
directories (for /usr/share/libreoffice/ OR under the apprpriate sub-path
(program/classes, as the case for /usr/share/java/).

Possible solutions:
1) The default path in the automatic or manual connect could pointed to /usr/lib/libreoffice/
2) Upstream could allow specifying multiple search paths
3) Upstream could hard-code in multiple search locations, such
as /usr/share/java/ and drop the hard-coded requirement for the
"program/classes/" subfolder, and search these optionally
4) Libreoffice could be more consistent in where .jar files are symlinked/installed. The "ure" package does not use /usr/lib/ for .jar installation.

Thanks!

[1] https://help.jabref.org/en/OpenOfficeIntegration
[2] https://www.onetransistor.eu/2015/04/libreoffice-bibliography-jabref.html

-- System Information:
Debian Release: 9.4
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-6-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages jabref depends on:
ii default-jre [java8-runtime] 2:1.8-58
ii java-wrappers 0.1.28
ii libandroid-json-java 7.0.0+r33-1
ii libantlr3-runtime-java 3.5.2-6
ii libantlr4-runtime-java 4.5.3-1
ii libbcprov-java 1.56-1+deb9u1
ii libcommons-cli-java 1.3.1-3
ii libcommons-lang3-java 3.5-1
ii libcommons-logging-java 1.2-1
ii libglazedlists-java 1.9.1-2
ii libguava-java 19.0-1
ii libhttpasyncclient-java 4.1.2-1
ii libhttpclient-java 4.5.2-2
ii libhttpmime-java 4.5.2-2
ii libjava-string-similarity-java 0.19-1
ii libjempbox-java 1:1.8.12-1
ii libjgoodies-common-java 1.8.1-2
ii libjgoodies-forms-java 1.9.0-3
ii libjgoodies-looks-java 2.7.0-2
ii libjhlabs-filters-java 2.0.235-3
ii libjsoup-java 1.10.2-1
ii liblog4j2-java 2.7-2
ii libmicroba-java 1:0.4.4.3-5
ii libpdfbox-java 1:1.8.12-1
ii libreoffice-java-common 1:6.0.2-1~bpo9+1
ii libspin-java 1.5+dfsg-8
ii libswing-layout-java 1.0.4-4
ii libswingx-java 1:1.6.2-2
ii libunirest-java-java 1.4.8-2
ii openjdk-8-jre [java8-runtime] 8u121-b13-4

Versions of packages jabref recommends:
ii libmysql-java 5.1.42-1
ii libpostgresql-jdbc-java 9.4.1212-1
ii libreoffice-writer 1:6.0.2-1~bpo9+1
ii xdg-utils 1.1.1-1

Versions of packages jabref suggests:
ii evince [postscript-viewer] 3.22.1-3+deb9u1
ii ghostscript [postscript-viewer] 9.20~dfsg-3.2+deb9u1
ii mupdf [pdf-viewer] 1.9a+ds1-4+deb9u2
ii okular [postscript-viewer] 4:16.08.2-1+b1

-- no debconf information

gregor herrmann

unread,
Apr 23, 2018, 9:20:02 AM4/23/18
to
Control: tag -1 + unreproducible

On Wed, 11 Apr 2018 15:15:32 +0100, D Haley wrote:

> Package: jabref
> Version: 3.8.1+ds-3
> Severity: normal
>
> The Libreoffice "connect" feature does not appear to work in this version
> of jabref by default.

Thanks for your bug report, and sorry for the late reply.
I could not reproduce it on unstable, and it took me a bit of time to
find an opportunity to test it on stable.

And unfortunately I also can't reproduce it on stable. When I start
LO writer and then JabRef and then click on the automatic connect
button it succeeds, and I can then e.g. press "Cite" to insert a
citation of the current book.

> Furthermore, as jabref insists on appending "program/classes/" to
> any path that you specify, you can only access them by supplying
> "/usr/lib/libreoffice/" as the path. Using /usr/share/java/ or
> /usr/share/libreoffice/ does not work, as not all jars are in these
> directories (for /usr/share/libreoffice/ OR under the apprpriate sub-path
> (program/classes, as the case for /usr/share/java/).

When I click an "manual connect", I see:
Path to OO/LO executable: /usr/lib/libreoffice/program/soffice
Path to OO/LO library dir: /usr/lib/libreoffice/program/classes

> Possible solutions:
[..]
> 4) Libreoffice could be more consistent in where .jar files are symlinked/installed. The "ure" package does not use /usr/lib/ for .jar installation.

The only thing I notice is that

> ii libreoffice-java-common 1:6.0.2-1~bpo9+1
> ii libreoffice-writer 1:6.0.2-1~bpo9+1

you are using LO from backports; maybe the library problem you
mention only exists there but not in plain stable or in unstable?

In any case, if a LO jar is not in the right directory (or a symlink)
this would be more a problem in some LO component (or ure) than in
jabref.


Cheers,
gregor

--
.''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org
: :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
`. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
`- BOFH excuse #3: electromagnetic radiation from satellite debris

Gary Porter

unread,
Jul 24, 2019, 12:10:02 PM7/24/19
to
Experiencing the same problem in Buster with a vanilla installation, but probably with a different cause.

Using jabref 3.8.2+ds-12, jabref is unable to connect to libreoffice automatically or manually.

I see this output from jabref when I attempt to connect:
java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
at net.sf.jabref.gui.openoffice.OpenOfficePanel.addURL(OpenOfficePanel.java:484) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.gui.openoffice.OpenOfficePanel.connect(OpenOfficePanel.java:419) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.gui.openoffice.OpenOfficePanel.lambda$initPanel$0(OpenOfficePanel.java:141) ~[JabRef-3.8.2.jar:?]
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967) ~[?:?]
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308) ~[?:?]
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) ~[?:?]
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) ~[?:?]
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279) ~[?:?]
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297) ~[?:?]
at java.awt.Component.processMouseEvent(Component.java:6632) ~[?:?]
at javax.swing.JComponent.processMouseEvent(JComponent.java:3342) ~[?:?]
at java.awt.Component.processEvent(Component.java:6397) ~[?:?]
at java.awt.Container.processEvent(Container.java:2263) ~[?:?]
at java.awt.Component.dispatchEventImpl(Component.java:5008) ~[?:?]
at java.awt.Container.dispatchEventImpl(Container.java:2321) ~[?:?]
at java.awt.Component.dispatchEvent(Component.java:4840) ~[?:?]
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918) ~[?:?]
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547) ~[?:?]
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488) ~[?:?]
at java.awt.Container.dispatchEventImpl(Container.java:2307) ~[?:?]
at java.awt.Window.dispatchEventImpl(Window.java:2772) ~[?:?]
at java.awt.Component.dispatchEvent(Component.java:4840) ~[?:?]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772) ~[?:?]
at java.awt.EventQueue$4.run(EventQueue.java:721) ~[?:?]
at java.awt.EventQueue$4.run(EventQueue.java:715) ~[?:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) ~[?:?]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) ~[?:?]
at java.awt.EventQueue$5.run(EventQueue.java:745) ~[?:?]
at java.awt.EventQueue$5.run(EventQueue.java:743) ~[?:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) ~[?:?]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:742) ~[?:?]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) [?:?]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) [?:?]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) [?:?]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) [?:?]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:?]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) [?:?]

JabRef was able to connect to LibreOffice fine for me in Stretch.

Thanks,
Gary
p.s. I inadvertently sent the last email as HTML (sorry), so I am resending it as plain text.

gregor herrmann

unread,
Aug 6, 2019, 8:20:03 PM8/6/19
to
Control: tag -1 + confirmed

On Wed, 24 Jul 2019 18:00:28 +0200, Gary Porter wrote:

> Experiencing the same problem in Buster with a vanilla installation, but probably with a different cause.
>
> Using jabref 3.8.2+ds-12, jabref is unable to connect to libreoffice automatically or manually.

I can reproduce this issue (on unstable). If I try to connect
manually (with the default values for the LO executable and libs), I
get an error message saying:

"File not found: /usr/lib/libreoffice/program/classes/program/classes/unoil.jar"

If I try to connect manually again but change the lib path from
/usr/lib/libreoffice/programm/classes to /usr/lib/libreoffice/ I
don't get an error window from JabRef but it still fails with a java
backtrace like yours:

02:11:07.355 [AWT-EventQueue-0] ERROR net.sf.jabref.FallbackExceptionHandler - Uncaught exception Occurred in Thread[AWT-EventQueue-0,6,main]
java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
at net.sf.jabref.gui.openoffice.OpenOfficePanel.addURL(OpenOfficePanel.java:484) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.gui.openoffice.OpenOfficePanel.connect(OpenOfficePanel.java:419) ~[JabRef-3.8.2.jar:?]
at net.sf.jabref.gui.openoffice.OpenOfficePanel.lambda$initPanel$1(OpenOfficePanel.java:142) ~[JabRef-3.8.2.jar:?]
So yeah. there is an issue; and this has worked the last time I tried
it … Maybe some change in OpenJDK? -- This needs further
investigation.


Cheers,
gregor

--
.''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org
: :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
`. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
`- NP: Page&Plant: Blue Train
signature.asc

tony mancill

unread,
Aug 10, 2019, 12:00:03 PM8/10/19
to
On Wed, Aug 07, 2019 at 02:14:04AM +0200, gregor herrmann wrote:
> Control: tag -1 + confirmed
>
> On Wed, 24 Jul 2019 18:00:28 +0200, Gary Porter wrote:
>
> > Experiencing the same problem in Buster with a vanilla installation, but probably with a different cause.
> >
> > Using jabref 3.8.2+ds-12, jabref is unable to connect to libreoffice automatically or manually.
>
> I can reproduce this issue (on unstable). If I try to connect
> manually (with the default values for the LO executable and libs), I
> get an error message saying:
>
> "File not found: /usr/lib/libreoffice/program/classes/program/classes/unoil.jar"
>
> If I try to connect manually again but change the lib path from
> /usr/lib/libreoffice/programm/classes to /usr/lib/libreoffice/ I
> don't get an error window from JabRef but it still fails with a java
> backtrace like yours:
>
> 02:11:07.355 [AWT-EventQueue-0] ERROR net.sf.jabref.FallbackExceptionHandler - Uncaught exception Occurred in Thread[AWT-EventQueue-0,6,main]
> java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
> at net.sf.jabref.gui.openoffice.OpenOfficePanel.addURL(OpenOfficePanel.java:484) ~[JabRef-3.8.2.jar:?]
>
> <snip>
>
> So yeah. there is an issue; and this has worked the last time I tried
> it … Maybe some change in OpenJDK? -- This needs further
> investigation.

Thank you both for reporting and confirming the issue. I will take a
look this weekend.

Cheers,
tony
signature.asc

tony mancill

unread,
Aug 12, 2019, 12:20:03 AM8/12/19
to
This is definitely due to a change in how classloaders work in Java
after Java 8. You can refer to this thread for more information:

https://community.oracle.com/thread/4011800

I spent a little time working on a patch for JabRef to use the

Class.forName("foo", true, new URLClassLoader(URL[] bar));

pattern if the ClassLoader returned from the system isn't an instance of
URLClassLoader, which addresses the first stacktrace reported, but there
are (at least) two more that need to be addressed in the JabRef sources.

So for the time-being, I recommend installing openjdk-8-jre and starting
jabref like so:

JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 jabref

Running on Java 8, I was able to manually connect to LibreOffice using
the parameters:

Path to OpenOffice/LibreOffice executable: /usr/bin/libreoffice
Path to OpenOffice/LibreOffice library dir: /usr/lib/libreoffice

I might continue to work on a patch for this, but even the latest
upstream version 4.3.1 doesn't run on Java 11 yet, so I'm reluctant to
invest too much in a hack that needs to be reworked upstream.

Regards,
tony
signature.asc

Flemming

unread,
Sep 8, 2019, 8:50:03 AM9/8/19
to
It looks like jabref still cannot connect to liberoffice. On ubuntu
18.04 with jabref 2.8.2 the bug persists. But, the workaround, using
openjdk-8 works.

https://bugs.launchpad.net/ubuntu/+source/jabref/+bug/1843171

flem

signature.asc

Pep Roca

unread,
Feb 12, 2022, 4:00:03 AM2/12/22
to
Package: jabref
Version: 3.8.2+ds-15
Followup-For: Bug #895440
X-Debbugs-Cc: pep....@gmail.com

Dear Maintainer,

First, thanks for your contributions to the Debian project!

I have problems to connect JabRef and LibreOffice in the jabref bullseye version.

I do manual connection and I get the error:

“File not found: /usr/lib/libreoffice/program/classes/program/classes/unoil.jar”

In fact, unoil.jar is in “/usr/lib/libreoffice/program/classes/”.

If I create the directory and I copy the jar file in the created directory, the problem is not solved.

Using version 8 of Java does not seem like an easy solution in Bullseye, since this version does not exist in Debian 11.

Kind regards and thanks for maintaining jabref


-- System Information:
Debian Release: 11.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-11-amd64 (SMP w/4 CPU threads)
Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.UTF-8 (charmap=UTF-8), LANGUAGE=ca:en_US:fr:es
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages jabref depends on:

ii default-jre 2:1.11-72
ii java-wrappers 0.3
ii libandroid-json-java 10.0.0+r36-1
ii libantlr3-runtime-java 3.5.2-9
ii libantlr4-runtime-java 4.7.2-5
ii libbcprov-java 1.68-2
ii libcommons-cli-java 1.4-2
ii libcommons-lang3-java 3.11-1
ii libcommons-logging-java 1.2-2
ii libglazedlists-java 1.9.1-3
ii libguava-java 29.0-6
ii libhttpasyncclient-java 4.1.4-1
ii libhttpclient-java 4.5.13-2
ii libhttpmime-java 4.5.13-2
ii libjava-string-similarity-java 2.0.0-1
ii libjaxb-java 2.3.0.1-10
ii libjempbox-java 1:1.8.16-2
ii libjgoodies-common-java 1.8.1-2.1
ii libjgoodies-forms-java 1.9.0-3.1
ii libjgoodies-looks-java 2.7.0-3
ii libjhlabs-filters-java 2.0.235-4
ii libjsoup-java 1.10.2-2
ii liblibreoffice-java 1:7.0.4-4+deb11u1
ii liblog4j2-java 2.17.0-1~deb11u1
ii libmicroba-java 1:0.4.4.3-5.1
ii libpdfbox-java 1:1.8.16-2
ii libspin-java 1.5+dfsg-8.1
ii libswing-layout-java 1.0.4-4.1
ii libswingx-java 1:1.6.2-4
ii libunirest-java-java 1.4.8-3

Versions of packages jabref recommends:

ii libmariadb-java 2.7.2-1
ii libpostgresql-jdbc-java 42.2.15-1
ii libreoffice-java-common 1:7.0.4-4+deb11u1
ii libreoffice-writer 1:7.0.4-4+deb11u1
ii xdg-utils 1.1.3-4.1

Versions of packages jabref suggests:

ii evince [postscript-viewer] 3.38.2-1
ii ghostscript [postscript-viewer] 9.53.3~dfsg-7+deb11u2
ii okular [postscript-viewer] 4:20.12.3-2
pn xpdf | pdf-viewer <none>

-- no debconf information

tony mancill

unread,
Feb 13, 2022, 12:50:03 PM2/13/22
to
Hello Pep,

On Sat, Feb 12, 2022 at 09:47:41AM +0100, Pep Roca wrote:
> Package: jabref
> Version: 3.8.2+ds-15
> Followup-For: Bug #895440
> X-Debbugs-Cc: pep....@gmail.com
>
> I have problems to connect JabRef and LibreOffice in the jabref bullseye version.
>
> I do manual connection and I get the error:
>
> “File not found: /usr/lib/libreoffice/program/classes/program/classes/unoil.jar”

Can you please provide the output from the program start to the time
when you attempt the connection and it fails?

DEBUG_WRAPPER=true /usr/bin/jabref

Thank you,
tony
signature.asc

Pep Roca

unread,
Feb 13, 2022, 4:20:04 PM2/13/22
to
Hello, Tony:

Thanks so much for this quick response.

El dg. 13 de 02 de 2022 a les 09:39 -0800, en/na tony mancill va
escriure:
Here it is:

$ DEBUG_WRAPPER=true /usr/bin/jabref
[debug] /usr/bin/jabref: Picking up the JVM designated by the
alternatives system:
[debug] /usr/bin/jabref: JAVA_HOME = '/usr/lib/jvm/java-11-openjdk-
amd64'
[debug] /usr/bin/jabref: Found JAVA_HOME = '/usr/lib/jvm/java-11-
openjdk-amd64'
[debug] /usr/bin/jabref: Found JAVA_CMD = '/usr/lib/jvm/java-11-
openjdk-amd64/bin/java'
[debug] /usr/bin/jabref: Environment variable CLASSPATH is ''
[debug] /usr/bin/jabref: Runnning /usr/lib/jvm/java-11-openjdk-
amd64/bin/java -classpath
/usr/share/java/jabref.jar:/usr/share/java/bcprov.jar:/usr/share/java/a
ntlr3-runtime.jar:/usr/share/java/antlr4-
runtime.jar:/usr/share/java/com.android.json.jar:/usr/share/java/common
s-cli.jar:/usr/share/java/commons-codec.jar:/usr/share/java/commons-
lang3.jar:/usr/share/java/commons-
logging.jar:/usr/share/java/fontbox.jar:/usr/share/java/glazedlists.jar
:/usr/share/java/guava.jar:/usr/share/java/httpasyncclient.jar:/usr/sha
re/java/httpclient.jar:/usr/share/java/httpcore.jar:/usr/share/java/htt
pcore-nio.jar:/usr/share/java/httpmime.jar:/usr/share/java/java-string-
similarity.jar:/usr/share/java/jaxb-
runtime.jar:/usr/share/java/jempbox.jar:/usr/share/java/jgoodies-
common.jar:/usr/share/java/jgoodies-forms.jar:/usr/share/java/jgoodies-
looks.jar:/usr/share/java/jhlabs-
filters.jar:/usr/share/java/jsoup.jar:/usr/share/java/juh.jar:/usr/shar
e/java/jurt.jar:/usr/share/java/log4j-api.jar:/usr/share/java/log4j-
core.jar:/usr/share/java/log4j-
jcl.jar:/usr/share/java/microba.jar:/usr/share/java/mariadb-java-
client.jar:/usr/share/java/pdfbox.jar:/usr/share/java/postgresql.jar:/u
sr/share/java/ridl.jar:/usr/share/java/spin.jar:/usr/share/java/swingx.
jar:/usr/share/java/swing-layout.jar:/usr/share/java/unirest-
java.jar:/usr/share/java/unoil.jar --add-
opens=java.desktop/java.awt=ALL-UNNAMED net.sf.jabref.JabRefMain
21:58:31.744 [AWT-EventQueue-0] WARN net.sf.jabref.JabRefGUI - There
seem to be problems with OpenJDK and the default GTK Look&Feel. Using
Metal L&F instead. Change to another L&F with caution.

I hope it's useful. Thank you very much.

Pep

>
> Thank you,
> tony

Pep Roca

unread,
Feb 14, 2022, 2:10:03 AM2/14/22
to
Hello, Tony:

I'm sorry. Now I put the full output.

El dg. 13 de 02 de 2022 a les 09:39 -0800, en/na tony mancill va
escriure:
22:20:39.017 [AWT-EventQueue-0] WARN net.sf.jabref.JabRefGUI - There
seem to be problems with OpenJDK and the default GTK Look&Feel. Using
Metal L&F instead. Change to another L&F with caution.
22:20:47.775 [AWT-EventQueue-0] WARN
net.sf.jabref.gui.openoffice.OpenOfficePanel - Could not connect to
running OpenOffice/LibreOffice
java.io.IOException: File not found:
/usr/lib/libreoffice/program/classes/program/classes/unoil.jar
at
net.sf.jabref.gui.openoffice.OpenOfficePanel.connect(OpenOfficePanel.ja
va:415) ~[JabRef-3.8.2.jar:?]
at
net.sf.jabref.gui.openoffice.OpenOfficePanel.lambda$initPanel$1(OpenOff
icePanel.java:142) ~[JabRef-3.8.2.jar:?]
at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967
) [?:?]
at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:
2308) [?:?]
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.j
ava:405) [?:?]
at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
[?:?]
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonLis
tener.java:279) [?:?]
at
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297
) [?:?]
at java.awt.Component.processMouseEvent(Component.java:6635)
[?:?]
at
javax.swing.JComponent.processMouseEvent(JComponent.java:3342) [?:?]
at java.awt.Component.processEvent(Component.java:6400) [?:?]
at java.awt.Container.processEvent(Container.java:2263) [?:?]
at java.awt.Component.dispatchEventImpl(Component.java:5011)
[?:?]
at java.awt.Container.dispatchEventImpl(Container.java:2321)
[?:?]
at java.awt.Component.dispatchEvent(Component.java:4843) [?:?]
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
[?:?]
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
[?:?]
at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488) [?:?]
at java.awt.Container.dispatchEventImpl(Container.java:2307)
[?:?]
at java.awt.Window.dispatchEventImpl(Window.java:2772) [?:?]
at java.awt.Component.dispatchEvent(Component.java:4843) [?:?]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
[?:?]
at java.awt.EventQueue$4.run(EventQueue.java:721) [?:?]
at java.awt.EventQueue$4.run(EventQueue.java:715) [?:?]
at java.security.AccessController.doPrivileged(Native Method)
~[?:?]
at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPri
vilege(ProtectionDomain.java:85) [?:?]
at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPri
vilege(ProtectionDomain.java:95) [?:?]
at java.awt.EventQueue$5.run(EventQueue.java:745) [?:?]
at java.awt.EventQueue$5.run(EventQueue.java:743) [?:?]
at java.security.AccessController.doPrivileged(Native Method)
~[?:?]
at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPri
vilege(ProtectionDomain.java:85) [?:?]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:742) [?:?]
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread
.java:203) [?:?]
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.ja
va:124) [?:?]
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread
.java:113) [?:?]
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
[?:?]
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
[?:?]
at
java.awt.EventDispatchThread.run(EventDispatchThread.java:90) [?:?]

Thanks a lot for the help.

Pep

>
> Thank you,
> tony

tony mancill

unread,
Feb 14, 2022, 10:10:03 AM2/14/22
to
Thank you Pep! I will follow-up soon.

tony mancill

unread,
Feb 18, 2022, 1:10:03 AM2/18/22
to
Hi Pep.

There is a parameter setting called ooJarsPath that I believe
might be set incorrectly for your installation and is causing the issue
you are seeing. There are two ways to access the setting.

1) Start JabRef and then navigate to:

Options -> Preferences -> Show Preferences

The key is "ooJarsPath" and the value should be "/usr/lib/libreoffice".
Based on the exception trace you provided in the bug report, I believe
it is currently set to "/usr/lib/libreoffice/program/classes" on your
system.

OR

2) Stop Jabref (so it doesn't overwrite the file) and edit the setting
directly in this file:

~/.java/.userPrefs/net/sf/jabref/prefs.xml

After saving the file, you can restart JabRef.

JabRef automatically appends "/program/classes" to the ooJars path on
Linux (see [1]), and the unoil.jar is found in
/usr/lib/libreoffice/program/classes/unoil.jar, so hopefully that
resolves the issue you are seeing.

Please let me know if it does not.

Cheers,
tony

[1] https://salsa.debian.org/java-team/jabref/-/blob/master/src/main/java/net/sf/jabref/gui/openoffice/OpenOfficePanel.java#L403
signature.asc

Pep Roca

unread,
Feb 21, 2022, 4:10:03 AM2/21/22
to
Helo, Tony:

Thank's for your help.

El dj. 17 de 02 de 2022 a les 21:58 -0800, en/na tony mancill va
escriure:
> Hi Pep.
>
> There is a parameter setting called ooJarsPath that I believe
> might be set incorrectly for your installation and is causing the
> issue
> you are seeing.  There are two ways to access the setting.
>
> 1) Start JabRef and then navigate to:
>
>   Options -> Preferences -> Show Preferences
>
> The key is "ooJarsPath" and the value should be
> "/usr/lib/libreoffice".
> Based on the exception trace you provided in the bug report, I
> believe
> it is currently set to "/usr/lib/libreoffice/program/classes" on your
> system.
>
> OR
>
> 2) Stop Jabref (so it doesn't overwrite the file) and edit the
> setting
> directly in this file:
>
>   ~/.java/.userPrefs/net/sf/jabref/prefs.xml
>
> After saving the file, you can restart JabRef.
>
> JabRef automatically appends "/program/classes" to the ooJars path on
> Linux (see [1]), and the unoil.jar is found in
> /usr/lib/libreoffice/program/classes/unoil.jar, so hopefully that
> resolves the issue you are seeing.  
>
> Please let me know if it does not.

In my file there is:

<entry key="ooExecutablePath" value="/usr/lib/libreoffice/program/soffice"/>
<entry key="ooJarsPath" value="/usr/lib/libreoffice/program/classes/"/>
<entry key="ooPath" value="/opt/openoffice.org3"/>

I have changed the value of the "ooJarsPath" to the correct value
"/usr/lib/libreoffice" and now the connection to the LibreOffice is
done correctly.

But when I click on the folder icon (“Select which open Write document
to work on”), nothing happens.

The output from the program is:

******************
$ DEBUG_WRAPPER=true /usr/bin/jabref
[debug] /usr/bin/jabref: Picking up the JVM designated by the alternatives system:  
[debug] /usr/bin/jabref:   JAVA_HOME = '/usr/lib/jvm/java-11-openjdk-amd64'
[debug] /usr/bin/jabref: Found JAVA_HOME = '/usr/lib/jvm/java-11-openjdk-amd64'
[debug] /usr/bin/jabref: Found JAVA_CMD = '/usr/lib/jvm/java-11-openjdk-amd64/bin/java'
[debug] /usr/bin/jabref: Environment variable CLASSPATH is ''
[debug] /usr/bin/jabref: Runnning /usr/lib/jvm/java-11-openjdk-amd64/bin/java  -classpath /usr/share/java/jabref.jar:/usr/share/java/
bcprov.jar:/usr/share/java/antlr3-runtime.jar:/usr/share/java/antlr4-runtime.jar:/usr/share/java/com.android.json.jar:/usr/share/java
/commons-cli.jar:/usr/share/java/commons-codec.jar:/usr/share/java/commons-lang3.jar:/usr/share/java/commons-logging.jar:/usr/share/j
ava/fontbox.jar:/usr/share/java/glazedlists.jar:/usr/share/java/guava.jar:/usr/share/java/httpasyncclient.jar:/usr/share/java/httpcli
ent.jar:/usr/share/java/httpcore.jar:/usr/share/java/httpcore-nio.jar:/usr/share/java/httpmime.jar:/usr/share/java/java-string-simila
rity.jar:/usr/share/java/jaxb-runtime.jar:/usr/share/java/jempbox.jar:/usr/share/java/jgoodies-common.jar:/usr/share/java/jgoodies-fo
rms.jar:/usr/share/java/jgoodies-looks.jar:/usr/share/java/jhlabs-filters.jar:/usr/share/java/jsoup.jar:/usr/share/java/juh.jar:/usr/
share/java/jurt.jar:/usr/share/java/log4j-api.jar:/usr/share/java/log4j-core.jar:/usr/share/java/log4j-jcl.jar:/usr/share/java/microb
a.jar:/usr/share/java/mariadb-java-client.jar:/usr/share/java/pdfbox.jar:/usr/share/java/postgresql.jar:/usr/share/java/ridl.jar:/usr
/share/java/spin.jar:/usr/share/java/swingx.jar:/usr/share/java/swing-layout.jar:/usr/share/java/unirest-java.jar:/usr/share/java/uno
il.jar --add-opens=java.desktop/java.awt=ALL-UNNAMED net.sf.jabref.JabRefMain
09:37:48.598 [AWT-EventQueue-0] WARN  net.sf.jabref.JabRefGUI - There seem to be problems with OpenJDK and the default GTK Look&Feel.
Using Metal L&F instead. Change to another L&F with caution.
09:38:02.728 [AWT-EventQueue-0] ERROR net.sf.jabref.FallbackExceptionHandler - Uncaught exception Occurred in Thread[AWT-EventQueue-0
,6,main]
java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (
jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
       at net.sf.jabref.gui.openoffice.OpenOfficePanel.addURL(OpenOfficePanel.java:484) ~[JabRef-3.8.2.jar:?]
       at net.sf.jabref.gui.openoffice.OpenOfficePanel.connect(OpenOfficePanel.java:419) ~[JabRef-3.8.2.jar:?]
       at net.sf.jabref.gui.openoffice.OpenOfficePanel.lambda$initPanel$1(OpenOfficePanel.java:142) ~[JabRef-3.8.2.jar:?]
       at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967) ~[?:?]
       at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308) ~[?:?]
       at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) ~[?:?]
       at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) ~[?:?]
       at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279) ~[?:?]
       at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297) ~[?:?]
       at java.awt.Component.processMouseEvent(Component.java:6635) ~[?:?]
       at javax.swing.JComponent.processMouseEvent(JComponent.java:3342) ~[?:?]
       at java.awt.Component.processEvent(Component.java:6400) ~[?:?]
       at java.awt.Container.processEvent(Container.java:2263) ~[?:?]
       at java.awt.Component.dispatchEventImpl(Component.java:5011) ~[?:?]
       at java.awt.Container.dispatchEventImpl(Container.java:2321) ~[?:?]
       at java.awt.Component.dispatchEvent(Component.java:4843) ~[?:?]
       at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918) ~[?:?]
       at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547) ~[?:?]
       at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488) ~[?:?]
       at java.awt.Container.dispatchEventImpl(Container.java:2307) ~[?:?]
       at java.awt.Window.dispatchEventImpl(Window.java:2772) ~[?:?]
       at java.awt.Component.dispatchEvent(Component.java:4843) ~[?:?]
       at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772) ~[?:?]
       at java.awt.EventQueue$4.run(EventQueue.java:721) ~[?:?]
       at java.awt.EventQueue$4.run(EventQueue.java:715) ~[?:?]
       at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
       at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) ~[?:?]
       at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) ~[?:?]
       at java.awt.EventQueue$5.run(EventQueue.java:745) ~[?:?]
       at java.awt.EventQueue$5.run(EventQueue.java:743) ~[?:?]
       at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
       at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) ~[?:?]
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:742) ~[?:?]
       at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) [?:?]
       at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) [?:?]
       at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) [?:?]
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) [?:?]
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:?]
       at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) [?:?]
******************

Perhaps the problem is deeper and the connection with a LibreOffice
document is fully broken without OpenJDK 8. The problem is that OpenJDK
8 is not available as a package in Debian Bullseye.

Kind regards and thanks for maintaining JabRef. Pep
0 new messages