-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Describe the bug
I am trying to use the Urban Wind Field: URock v2023a tool in QGIS on a MacBook Air with an Apple M2 chip, but I always get a Java/JVM error and the algorithm stops.
Desktop (please complete the following information):
- OS: macOS Tahoe 26.1 Apple M2 (MacBook Air)
- QGIS Version: 3.40.5 - Bratislava
- UMEP Version: 4.4.3
- UMEP for processing: 2.2.3 (I also tried the current ZIP from the UMEP repository)
- Java: 25.0.1 (arm64) „Oracle Corporation“ – „Java SE 25.0.1“
21.0.9 (arm64) „Oracle Corporation“ – „Java SE 21.0.9“
21.0.3 (arm64) „Eclipse Adoptium“ – „OpenJDK 21.0.3“
What I tried
- Installed JDK 21 (in addition to 25) for macOS ARM
- Set JAVA_HOME in the terminal to the JDK 21 path
- Verified that libjli.dylib exists on my system in several locations
- Installed the current UMEP-processing ZIP from GitHub (UMEP-processing-main) via “Install from ZIP” in QGIS, so I am not only using the plugin repository version.
When I run Processing → UMEP for Processing → Wind → Urban Wind Field: URock v2023a
with my input data, I always get this traceback (shortened to the relevant part):
Algorithm 'Urban Wind Field: URock v2023a' starting…
[...]
Traceback (most recent call last):
File ".../python/plugins/UMEP-processing-main/processor/urock_processing_algorithm.py", line 447, in processAlgorithm
MainCalculation.main(javaEnvironmentPath = javaEnvVar,
File ".../python/plugins/UMEP-processing-main/functions/URock/MainCalculation.py", line 146, in main
H2gisConnection.startH2gisInstance(dbDirectory = dBDir,
File ".../python/plugins/UMEP-processing-main/functions/URock/H2gisConnection.py", line 144, in startH2gisInstance
conn = jaydebeapi.connect( "org.h2.Driver",
File ".../site-packages/jaydebeapi/__init__.py", line 412, in connect
jconn = _jdbc_connect(jclassname, url, driver_args, jars, libs)
File ".../site-packages/jaydebeapi/__init__.py", line 198, in _jdbc_connect_jpype
jpype.startJVM(jvm_path, *args, ignoreUnrecognized=True,
File ".../site-packages/jpype/_core.py", line 357, in startJVM
_jpype.startup(jvmpath, tuple(jvm_args + extra_jvm_args),
FileNotFoundError: [Errno 2] JVM DLL not found: /Library/Java/JavaVirtualMachines/jdk-25.jdk/Contents/Home/lib/libjli.dylib
So it seems that URock / jpype still tries to start the JVM explicitly with the path /Library/Java/JavaVirtualMachines/jdk-25.jdk/Contents/Home/lib/libjli.dylib even though I set JAVA_HOME to JDK 21 and multiple JDKs are available on the system.
My questions
1. Is there a recommended Java version / vendor for URock on macOS Apple Silicon (M1/M2)?
2. Is there a way to force URock / UMEP-processing to use the JDK 21 installation instead of the hardcoded jdk-25 path on macOS?
3. Would you recommend a manual edit of MainCalculation.py or H2gisConnection.py for macOS, or is there already a patch / development branch that handles Apple Silicon + multiple JDKs more robustly?
I'd be very grateful for any ideas. Thank you!