Errors when tyring to connect to Libreoffice from jabref on Debian

Hi. Trying to connect to libreoffice as described here – OpenOffice/LibreOffice integration | JabRef. I get this exception on attempt to connect:

17:57:11.284 [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$0(OpenOfficePanel.java:141) ~[JabRef-3.8.2.jar:?]
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972) ~[?:?]
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313) ~[?:?]
...

Setup info:

$ dpkg -l jabref java-common libreoffice libreoffice-base | grep "^ii"
ii  jabref           3.8.2+ds-17       all          graphical frontend to manage BibTeX and BibLaTeX databases
ii  java-common      0.74              all          Base package for Java runtimes
ii  libreoffice      4:7.4.7-1+deb12u6 amd64        office productivity suite (metapackage)
ii  libreoffice-base 4:7.4.7-1+deb12u6 amd64        office productivity suite -- database
$ java -version
openjdk version "17.0.14" 2025-01-21
OpenJDK Runtime Environment (build 17.0.14+7-Debian-1deb12u1)
OpenJDK 64-Bit Server VM (build 17.0.14+7-Debian-1deb12u1, mixed mode, sharing)
$ jar -xf  /usr/lib/libreoffice/program/classes/unoil.jar
$ cat META-INF/MANIFEST.MF 
Manifest-Version: 1.0
Class-Path:  libreoffice.jar
Solar-Version: 7.4.7.2
Created-By: 17.0.13 (Debian)

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 12 (bookworm)
Release:	12
Codename:	bookworm

Any ideas?

HI,
it seems like you are using an old version of JabRef. The JabRef version in the Debian repos is not the latest.
The latest version is 5.15. You need to install it manually.

Upgraded to 6.0.1 from Github. works like a charm. New version is much slicker too. Thank you!

P.S. Noticed after posting Ubuntu and Debian testing are still only on 3.8.2 and this has been an open issue on Debian bug tracker for over 5 years. Sigh.

1 Like

Glad that it works. Yeah, the problem is that providing an up-to-date version of JabRef in the debian repositories is very difficult as all the dependencies have to be provided as well as packaging etc. We maintainers don’t have the time and experience for this. We try to spend out time on improving JabRef itself