the QuickReload plugin doesn’t work when running Confluence (probably same issue with Jira) with a native arm64 JDK on M1 MacBooks:
java.lang.UnsatisfiedLinkError: Can't load library: /Users/jens/k15t/confluence-7.18/atlassian-confluence/temp/jpathwatch-nativelib-v-0-95-atlassian-1-libjpathwatch-native-32.dylib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2633)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.System.load(System.java:1837)
at name.pachler.nio.file.impl.NativeLibLoader.extractAndLoadLibrary(NativeLibLoader.java:406)
at name.pachler.nio.file.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:256)
at name.pachler.nio.file.impl.Unix.<clinit>(Unix.java:86)
at name.pachler.nio.file.impl.BSDPathWatchService.open(BSDPathWatchService.java:241)
at name.pachler.nio.file.impl.BSDPathWatchService.<init>(BSDPathWatchService.java:80)
at name.pachler.nio.file.ext.Bootstrapper.newWatchService(Bootstrapper.java:86)
at name.pachler.nio.file.FileSystems$1.newWatchService(FileSystems.java:40)
at com.atlassian.watch.nio.file.api.FileSystems$FileSystem.jWatchService(FileSystems.java:42)
at com.atlassian.watch.nio.file.api.FileSystems$FileSystem.newWatchService(FileSystems.java:31)
at com.atlassian.labs.plugins.quickreload.DirectoryWatcher.<init>(DirectoryWatcher.java:62)
...
It tries to load the native lib from these locations as well, but also fails (same stacktrace otherwise):
I am able to replicate this issue in both JDK 1.8 and JDK 11 ( jdk-11.0.16) and able to resolve it with the below changes.
Please try with 11.0.3 or 11.0.9 version and add the below recommended configurations in the plugin’s POM where the product-specific plugin is configured.
I’m using this on a standalone Confluence installation (installed according to the official installation guide), not an instance that’s started via maven. So I’m sure that those properties don’t affect it, because none of the dev tools using them are installed in that instance. I’m installing quickreload manually via UPM.
At least extractDependencies is set to false in our product poms, though.
Also I don’t think going back to an older JVM version is a viable long term fix.
Could it be that your 11.0.3 or 11.0.9 JVM versions are x86_64 executables and not aarch64? Because I’m relatively sure that an aarch64 JVM cannot load the x86_64 shared libraries bundled in quickreload, failing with the error I mentioned above.
Yeah, I am using the OracleJDK and below is the Runtime environment details
java version “11.0.3” 2019-04-16 LTS
Java™ SE Runtime Environment 18.9 (build 11.0.3+12-LTS)
Java HotSpot™ 64-Bit Server VM 18.9 (build 11.0.3+12-LTS, mixed mode) and platform is OSX Darwin Kernel Version 21.6.0 xnu-8020.141.5~2/RELEASE_ARM64_T6000 arm64.
Hi, when I use an x64 JVM then quickreload works as expected, but the point of this request was compatibility with aarm64 JVMs to avoid the performance impacts of running x64 executables on Rosetta.
As far as I understood the problem to enable this a new quickreload release would be required with a release of atlassian-jpathwatch containing an aarch64 version of the native library, essentially “libjpathwatch-native-aarm64.dylib” next to those: Bitbucket
@jens, @y from the bitbucket team experimenting the above requirement for tracking purpose we have create this ticket under QuickReload project, [QR-20] - Ecosystem Jira.
as this is not a direct feature implementation in atlassian products(not a customer ask), and this requirement is useful for the developers work on M1 MacBooks, we are looking for code contributors internally as we are already busy with other tasks.
however if the solution is ready by @y or any other contributors we will keep you post the updates.
thanks for reaching out to us.
Thanks @NarendraGhanta, I appreciate this being looked into!
Any chance I could get access to that ticket? It seems to be restricted but the project itself is not.
Thanks,
I get a “You don’t have access to this issue” message when opening https://ecosystem.atlassian.net/browse/QR-20.
I can open other issues in that project such as https://ecosystem.atlassian.net/browse/QR-18, so it seems to be some restriction on QR-20 and not on the project.