Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jabref does not run with gradle on Fedora and Nobara #11464

Open
2 tasks done
ThiloteE opened this issue Jul 8, 2024 · 9 comments
Open
2 tasks done

Jabref does not run with gradle on Fedora and Nobara #11464

ThiloteE opened this issue Jul 8, 2024 · 9 comments

Comments

@ThiloteE
Copy link
Member

ThiloteE commented Jul 8, 2024

JabRef version

Latest development branch build (please note build date below)
2024-07-07 with commit b91e030

JabRef 5.14
JabRef 5.13
JabRef 5.12
JabRef 5.11

Operating system

GNU / Linux

Details on version and operating system

Fedora 40, KDE Plasma 6.1.1, Kernel 6.9.7-200, Wayland

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

Description:

JabRef does not compile with gradle on Fedora and Nobara (Fedora based distribution).

How to reproduce:

  1. Get the JabRef code into your local workspace as described in the devdocs
  2. Open folder with JabRef code.
  3. Open the commandline
  4. Use following command: ./gradlew run

Notes:

JavaFXreproducer does compile.

Appendix

...

Log File
$ ./gradlew run

> Configure project :
Project : => 'org.jabref' Java module

> Task :run
Messages are not initialized before accessing key: Display help on command line options
2024-07-08 23:37:05 [main] org.jabref.Launcher.clearOldSearchIndices()
INFO: Deleting out-of-date fulltext search index at /home/thilo/.local/share/jabref/lucene/95.
2024-07-08 23:37:05 [JavaFX Application Thread] org.jabref.gui.theme.ThemeManager.addStylesheetToWatchlist()
INFO: Watching css /home/thilo/Prog/Development/JabRef-JabRef_JabRef/JabRef/build/resources/main/org/jabref/gui/Base.css for live updates
2024-07-08 23:37:05 [JavaFX Application Thread] org.jabref.gui.theme.ThemeManager.updateThemeSettings()
INFO: Not updating theme because it hasn't changed
2024-07-08 23:37:05 [JavaFX Application Thread] org.jabref.gui.theme.ThemeManager.updateThemeSettings()
INFO: Theme set to Theme{type=DEFAULT, name=''} with base css StyleSheet{file:/home/thilo/Prog/Development/JabRef-JabRef_JabRef/JabRef/build/resources/main/org/jabref/gui/Base.css}
Exception in Application start method
2024-07-08 23:37:07 [main] org.jabref.Launcher.main()
ERROR: Unexpected exception: java.lang.RuntimeException: Exception in Application start method
        at [email protected]/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:893)
        at [email protected]/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
        at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.awt.HeadlessException: 
No X11 DISPLAY variable was set,
or no headful library support was found,
but this program performed an operation which requires it,

        at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:166)
        at java.desktop/java.awt.Toolkit.getSystemSelection(Toolkit.java:1037)
        at [email protected]/org.jabref.gui.ClipBoardManager.<init>(ClipBoardManager.java:42)
        at [email protected]/org.jabref.gui.JabRefGUI.initialize(JabRefGUI.java:151)
        at [email protected]/org.jabref.gui.JabRefGUI.start(JabRefGUI.java:86)
        at [email protected]/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:839)
        at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:483)
        at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
        at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
        at [email protected]/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
        at [email protected]/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        at [email protected]/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$10(GtkApplication.java:264)
        ... 1 more

BUILD SUCCESSFUL in 9s
9 actionable tasks: 1 executed, 8 up-to-date

@Siedlerchr
Copy link
Member

Seems to be an awt issue with the clipboard manager

@Siedlerchr Siedlerchr changed the title Jabref does not compile with gradle on Fedora and Nobara Jabref does not run with gradle on Fedora and Nobara Jul 9, 2024
@koppor koppor added build-system os: linux os: snap When JabRef is run as a snap on linux and removed os: snap When JabRef is run as a snap on linux labels Jul 9, 2024
@koppor
Copy link
Member

koppor commented Jul 9, 2024

Now the "fun" part of Software Engineering starts... Systematic trial and error. To state which variant works and which doesn't. We already learned that the javafxreproducer starts.

Googling found following hints:

https://stackoverflow.com/a/75931990/873282 - it might really be that the gradle Toolchain picks up a non-wanted JDK. Are there any logs when running ./gradlew --info run? I mean: Is it output which JDK is used?

https://www.baeldung.com/linux/no-x11-display-error proposes to use ssh on Wayland. Really strange...

This one is also interesting 🙈 - https://unix.stackexchange.com/a/771546

@koppor
Copy link
Member

koppor commented Jul 9, 2024

I got it running:

image

sudo dnf install -y java-21-openjdk-devel.x86_64

@koppor
Copy link
Member

koppor commented Jul 9, 2024

I also added X11 support for Fedora39 - just to be sure:
sudo dnf install -y kwin-x11 plasma-workspace-x11

@koppor koppor mentioned this issue Jul 9, 2024
6 tasks
@koppor
Copy link
Member

koppor commented Jul 10, 2024

declare -X DISPLAY=:0"

@ThiloteE
Copy link
Member Author

sudo dnf install -y java-21-openjdk-devel.x86_64 did work.

@ThiloteE
Copy link
Member Author

I would close the issue, once the apparent bug fix has been backported to the stable version of jdk 21, but I checked the jdk branches on github and there is no active jdk21 branch. Their latest tagged version has been stale for over a year, so what to do?

@Siedlerchr
Copy link
Member

@ThiloteE They use different repos for backports

@koppor
Copy link
Member

koppor commented Jul 10, 2024

The thing is: I assumed that foojay would download the JDK automatically. But it does not for Fedora. WTF. --> Thus either "fix" foojay or fix our developer documentation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants