Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#78707 - [josm] Module javafx.web not found on launch

Attached to Project: Arch Linux
Opened by tuxayo (tuxayo) - Sunday, 04 June 2023, 22:07 GMT
Last edited by Toolybird (Toolybird) - Monday, 05 June 2023, 05:44 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Jaroslav Lichtblau (Dragonlord)
NicoHood (NicoHood)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 19
Private No

Details

Description:after updating JOSM I tried to ran it and got:

Using /usr/bin/java to execute josm.
Error occurred during initialization of boot layer
java.lang.module.FindException: Module javafx.web not found

Installing java-openjfx didn't change anything.


Additional info:
~ ❯❯❯ java --version
openjdk 20.0.1 2023-04-18
OpenJDK Runtime Environment (build 20.0.1+9)
OpenJDK 64-Bit Server VM (build 20.0.1+9, mixed mode, sharing)



This task depends upon

Comment by tuxayo (tuxayo) - Sunday, 04 June 2023, 22:09 GMT
Sorry I missed setting the Severity field.
Comment by Manuel Reimer (M-Reimer) - Monday, 05 June 2023, 14:38 GMT
Same issue here. Changing the Java version did not help either:

$ java --version
openjdk 11.0.19 2023-04-18
OpenJDK Runtime Environment (build 11.0.19+7)
OpenJDK 64-Bit Server VM (build 11.0.19+7, mixed mode)
Comment by Alexander Minges (athemis) - Tuesday, 06 June 2023, 14:14 GMT
As a work around: JOSM starts when using jre8-openjdk. However, according to upstream it _should_ at least work with java-17 (which is doesn't for me even with java17-openjfx installed).
Comment by Eugene Dvoretsky (radioxoma) - Wednesday, 07 June 2023, 10:21 GMT
Running `josm` in terminal leads to error. However `java -jar /usr/share/java/josm/josm.jar` works with both jre-openjdk and jre17-openjdk. Looks like issue with `/usr/bin/josm` script. Also newer version 18746 has been released.
Comment by ronald (jronald) - Thursday, 08 June 2023, 03:46 GMT
Same here, `java -jar /usr/share/java/josm/josm.jar` works.
```sh
$ pacman -Qs jre
local/jre-openjdk 20.0.1.u9-3
OpenJDK Java 20 full runtime environment
local/jre-openjdk-headless 20.0.1.u9-3
OpenJDK Java 20 headless runtime environment
```
Comment by faded.solivagant (faded.solivagant) - Wednesday, 21 June 2023, 14:41 GMT
Same here.
```
openjdk 20.0.1 2023-04-18
OpenJDK Runtime Environment (build 20.0.1+9)
OpenJDK 64-Bit Server VM (build 20.0.1+9, mixed mode, sharing)
```
The issue is still present.
Comment by Yao Mitachi (yaomtc) - Thursday, 29 June 2023, 01:00 GMT
Also having this issue.

Possibly relevant: https://bugs.archlinux.org/task/72953

The josm-stable AUR package has the same version of JOSM but its much shorter /usr/bin/josm script works:

#!/bin/sh
# source application-specific settings
while true; do
JOSM_ARGS=
[ -f /etc/conf.d/josm ] && . /etc/conf.d/josm
CLASSPATH="/usr/share/java/josm/josm.jar"
java ${JOSM_ARGS} -cp "${CLASSPATH}" -Djosm.restart=true org.openstreetmap.josm.gui.MainApplication "$@"
[ $? -eq 9 ] || break
done
Comment by Arvid Norlander (VorpalGun) - Sunday, 06 August 2023, 15:04 GMT
Also running into this.

```
java --version
openjdk 20.0.2 2023-07-18
OpenJDK Runtime Environment (build 20.0.2+9)
OpenJDK 64-Bit Server VM (build 20.0.2+9, mixed mode, sharing)
```
Comment by sTiKyt (sTiKyt) - Thursday, 17 August 2023, 16:51 GMT
Same, `josm-stable` seems to work and provides same package.

I use it as a workaround for now
Comment by Frederik “Freso” S. Olesen (Freso) - Friday, 18 August 2023, 20:40 GMT
I noticed `JAVAFX_HOME="${JAVAFX_HOME:-/usr/share/openjfx/lib}"` in /usr/bin/josm and added a `JAVAFX_HOME=/usr/lib/jvm/default/lib/` line to /etc/conf.d/josm (java-openfx installs the needed .jar files to /usr/lib/jvm/java-20-openjdk/lib/; there’s no /usr/share/openjfx on my system), which just made it complain about "java.lang.LayerInstantiationException: Package jdk.internal.jimage in both module jrt.fs and module java.base" instead and I don’t know Java well enough to know how to fix or work around that.

Edit: New error seems to be an issue with how Arch installs OpenJFX into /usr/lib/jvm: https://stackoverflow.com/a/62899144/5193095
Edit 2: Based on that SO answer I adjusted JAVAFX_HOME in /etc/conf.d/josm to `JAVAFX_HOME=/usr/lib/jvm/default/lib/javafx.base.jar:/usr/lib/jvm/default/lib/javafx.web.jar:/usr/lib/jvm/default/lib/javafx.controls.jar:/usr/lib/jvm/default/lib/javafx.swing.jar:/usr/lib/jvm/default/lib/javafx.media.jar:/usr/lib/jvm/default/lib/javafx.graphics.jar:/usr/lib/jvm/default/lib/javafx.fxml.jar` and JOSM seems to work now, so that is another possible workaround for the time being if you want to minimise your AUR reliance. :) (`JAVAFX_HOME=/usr/lib/jvm/default/lib/javafx.base.jar:/usr/lib/jvm/default/lib/javafx.web.jar:/usr/lib/jvm/default/lib/javafx.controls.jar:/usr/lib/jvm/default/lib/javafx.swing.jar:/usr/lib/jvm/default/lib/javafx.media.jar:/usr/lib/jvm/default/lib/javafx.graphics.jar` seems to be the minimal required JAVAFX_HOME, but I’ve included javafx.fxml.jar in case anything actually uses that that just isn’t referenced yet at boot time. Not sure if Java actually works like that or not, but including it also doesn’t seem to break it, so 🤷)

Edit 3: Package with workaround‐fixes (and version bump) can be found at https://gitlab.archlinux.org/freso/josm/-/tree/47b89da2f9ad92e5757121e63031b86b295af29f if anyone is interested. I’d suggest to change $pkgrel to 0 so you’ll get the update from the repository whenever it gets fixed in the package proper. :)
Comment by Oid Maps (dreieck) - Sunday, 20 August 2023, 13:57 GMT
`/usr/bin/josm` is a debian-specific script. Maybe that's root cause of problem? See also https://bugs.archlinux.org/task/79420.
Comment by Oid Maps (dreieck) - Monday, 21 August 2023, 13:13 GMT
Actually, same issue here, also when starting josm.jar directly.
Comment by Popolon (Popolon) - Tuesday, 19 September 2023, 07:42 GMT
Same error:

dpkg: no packages found matching openjdk-*-jre
dpkg: no packages found matching openjdk-*-jre:amd64
Using /usr/bin/java to execute josm.
Error occurred during initialization of boot layer
java.lang.module.FindException: Module javafx.web not found

Installing java-openjfx, that isn't in dependencies (definitively should be) didn't resolved the issue.

Tried by installing java17-openjfx, I have the same issue.

I just noticed that jdk11-openjdk is still on my system, and if I try to remove it pacman complain about few application dependencies on it via java-environment dependence. Maybe the solution should be to switch by one way (don't know which one but removing all dependencies, removing v11 and reinstalling current version (v20) and the packages depending on it, after that.

After:
* removing all old jdk/jre and their dependencies
* force a new installation of last jre-openjdk jre-openjdk-headless jdk-openjdk packages
* installing java-openjfx again
* changed /usr/bin/josm, as said in the https://bugs.archlinux.org/task/78707#comment219130
This works.

Loading...