jabref: JabRef not working on Arch Linux

I am on an Arch Linux machine with the following:

~/JabRef> git branch -vv
* master 4add3167c [origin/master] Bump jaxb-xjc from 2.2.4-1 to 2.3.2 (#4956)
~/JabRef> pacman -Q | grep -i java
java-environment-common 3-1
java-runtime-common 3-1
~/JabRef> archlinux-java status
Available Java environments:
  java-11-openjdk (default)
~/JabRef> java --version
openjdk 11.0.4 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11)
OpenJDK 64-Bit Server VM (build 11.0.4+11, mixed mode)
~/JabRef> git submodule status 
 e89e6b08b5c621a414fc7114f2129efac5f8c7d5 src/main/resources/csl-locales (heads/master)
 83603de7a7f4652f8d1733f18f0c00be8974948e src/main/resources/csl-styles (heads/master)

Steps to reproduce the behavior:

  1. gradle releaseJar or gradle shadowJar (see log)
  2. java -jar build/releases/JabRef-5.0-dev.jar

I have a failure with the following error:

Error: Could not find or load main class org.jabref.org.jabref.JabRefLauncher
Caused by: java.lang.ClassNotFoundException: org.jabref.org.jabref.JabRefLauncher
Log File
> Task :buildSrc:compileJava NO-SOURCE
> Task :buildSrc:compileGroovy
> Task :buildSrc:processResources NO-SOURCE
> Task :buildSrc:classes
> Task :buildSrc:jar
> Task :buildSrc:assemble
> Task :buildSrc:compileTestJava NO-SOURCE
> Task :buildSrc:compileTestGroovy NO-SOURCE
> Task :buildSrc:processTestResources NO-SOURCE
> Task :buildSrc:testClasses UP-TO-DATE
> Task :buildSrc:test NO-SOURCE
> Task :buildSrc:check UP-TO-DATE
> Task :buildSrc:build

> Configure project :
Found module name 'org.jabref'

> Task :generateBibtexmlSource
> Task :generateBstGrammarSource
> Task :generateEndnoteSource
> Task :generateMedlineSource
> Task :generateModsSource
> Task :generateSearchGrammarSource
> Task :generateSource

> Task :compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :processResources
> Task :classes
> Task :shadowJar
> Task :releaseJar

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.6.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 37s
10 actionable tasks: 10 executed

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 57 (21 by maintainers)

Commits related to this issue

Most upvoted comments

Debian packages are fine to convert; that might be the more reliable way. The filename will remain stable as it has been for the jar, right?

It runs. This is the log:

ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
ERROR ThemeLoader Could not watch css file for changes jrt:/org.jabref/org/jabref/gui/Base.css
 java.lang.UnsupportedOperationException
        at java.base/jdk.internal.jrtfs.JrtPath.register(Unknown Source)
        at java.base/jdk.internal.jrtfs.JrtPath.register(Unknown Source)
        at org.jabref/org.jabref.gui.util.DefaultFileUpdateMonitor.addListenerForFile(Unknown Source)
        at org.jabref/org.jabref.gui.util.ThemeLoader.addAndWatchForChanges(Unknown Source)
        at org.jabref/org.jabref.gui.util.ThemeLoader.installCss(Unknown Source)
        at org.jabref/org.jabref.JabRefGUI.openWindow(Unknown Source)
        at org.jabref/org.jabref.JabRefGUI.<init>(Unknown Source)
        at org.jabref/org.jabref.JabRefMain.start(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at org.jabref.merged.module/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
        at org.jabref.merged.module/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
        at org.jabref.merged.module/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at org.jabref.merged.module/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
ERROR ThemeLoader Could not watch css file for changes jrt:/org.jabref/org/jabref/gui/Base.css
 java.lang.UnsupportedOperationException
        at java.base/jdk.internal.jrtfs.JrtPath.register(Unknown Source)
        at java.base/jdk.internal.jrtfs.JrtPath.register(Unknown Source)
        at org.jabref/org.jabref.gui.util.DefaultFileUpdateMonitor.addListenerForFile(Unknown Source)
        at org.jabref/org.jabref.gui.util.ThemeLoader.addAndWatchForChanges(Unknown Source)
        at org.jabref/org.jabref.gui.util.ThemeLoader.installCss(Unknown Source)
        at org.jabref/org.jabref.gui.util.BaseDialog.<init>(Unknown Source)
        at org.jabref/org.jabref.gui.help.AboutDialogView.<init>(Unknown Source)
        at org.jabref/org.jabref.gui.help.AboutAction.execute(Unknown Source)
        at org.jabref/org.jabref.gui.actions.JabRefAction.lambda$new$2(Unknown Source)
        at org.jabref.merged.module/org.controlsfx.control.action.Action.handle(Unknown Source)
        at org.jabref.merged.module/org.controlsfx.control.action.Action.handle(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
        at org.jabref.merged.module/javafx.event.Event.fireEvent(Unknown Source)
        at org.jabref.merged.module/javafx.scene.control.MenuItem.fire(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.doSelect(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.lambda$createChildren$12(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
        at org.jabref.merged.module/javafx.event.Event.fireEvent(Unknown Source)
        at org.jabref.merged.module/javafx.scene.Scene$MouseHandler.process(Unknown Source)
        at org.jabref.merged.module/javafx.scene.Scene$MouseHandler.access$1200(Unknown Source)
        at org.jabref.merged.module/javafx.scene.Scene.processMouseEvent(Unknown Source)
        at org.jabref.merged.module/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at org.jabref.merged.module/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
        at org.jabref.merged.module/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
        at org.jabref.merged.module/com.sun.glass.ui.View.notifyMouse(Unknown Source)
        at org.jabref.merged.module/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at org.jabref.merged.module/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)

@tobiasdiez IMHO, the last one is necessary and sufficient. Of course, Arch’s packaging system knows how to interpret/unpack deb and rpm packages/archives so that we can just point to those files in PKGBUILD and do necessary directory changes (move parts to places which Arch suggests). However, a tar or tar.gz archive is more generic and already enough. In a sense, you decide (as the developers) what files are needed for the application to run, pack them properly, and let the package maintainers do their work. deb is good for your Debian-based users (Debian and *buntu distros) while rpm will cover RedHat-based users (RedHat, Fedora, etc.). In any case, if you want to let other distros use JabRef easily, you

  • either provide directions to how to build it from source (we already have some text in docs now),
  • or provide an archive (tar.gz in this case) that contains the self-contained cross-platform compatible binaries.

For this reason, I think that tar.gz is necessary and sufficient. A nice talk on this is here if you have some time to spend and smile 😄

Thanks for the feedback. I will try to modify our Circle CI script to include that

It runs, and open a graphical installer that looks like the ones that Windows has. I canceled it when it wanted to write to system directories; which is not possible for a regular user and I would never execute a script like that with root.

I looked into the code and there seems to be no other option than running that installer. So, from my point of view, it’s of little use for linux users. I don’t see how to use it for packaging Jabref.

Ok, I think it should be sufficient to package only build/image, i.e. change

cp -R "${pkgname}/build" "${pkgdir}/opt/jabref"

to

cp -R "${pkgname}/build/image" "${pkgdir}/opt/jabref"

This should reduce the size of the package considerably. (For example, jlinkbase is used during jlink but not required afterwards.)

As a side note, I will experiment with jpackage during the next days. This should give rpm or deb packages for linux (not sure if they are also usable with arch).