URock v2023a unable to find Java #713
Replies: 7 comments 14 replies
-
Hi @harmen6464 and sorry for the delay of my response. Can you please open a QGIS Python Console and type the following (line by line) and then share what output message you get ? import winreg
java_key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\JavaSoft\Java Development Kit")
current_version, _ = winreg.QueryValueEx(java_key, "CurrentVersion")
java_version_key = winreg.OpenKey(java_key, current_version)
javaPath, _ = winreg.QueryValueEx(java_version_key, "JavaHome")
print(javaPath) |
Beta Was this translation helpful? Give feedback.
-
@j3r3m1 thank you for your response. After installing another version of Java from https://www.java.com/nl/download/manual.jsp I managed to get a different URock error (see below). I am not sure if this is an improvement compared to the previous. Anyway, the output message I get when inserting your input in the QGIS python console is the following: import winreg As you can see, I had to change Java Development Kit to JDK in order to make it work, might this be part of the problem? Below is the new URock error: QGIS versie: 3.34.14-Prizren Writing settings for this model run to specified output folder (Filename: RunInfoURock_YYYY_DOY_HHMM.txt) The above exception was the direct cause of the following exception: Traceback (most recent call last): Execution failed after 1.90 seconden Resultaatlagen laden |
Beta Was this translation helpful? Give feedback.
-
I have now also tried it on another laptop to check if it was caused by my laptop. However, on the other laptop it resulted in the same error as I had the first time (see below). I installed Java from the link in the UMEP docs, https://download.oracle.com/java/24/latest/jdk-24_windows-x64_bin.exe When entering the input suggested by @j3r3m1 in the Python-Console in QGIS, I get the following issue: import winreg When changing "Java Development Kit" to "JDK" I get the following output: java_key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\JavaSoft\JDK") When looking in the register editor, it seems that Urock is trying to find Java Runtime Environment or Java Development Toolkit. However, there is only JDK. Is the issue related to the name, or is there another problem? And what can I do to overcome this problem? QGIS versie: 3.40.3-Bratislava Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): Uitvoering mislukt na 0.13 seconden Resultaatlagen laden |
Beta Was this translation helpful? Give feedback.
-
Please have a try now (with version 2.1.14) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
do you have the OSGEO4W shell command ? If so open it and then you will have a frightening command prompt. You can then just type: pip install jpype==1.5.0 Then restart QGIS and retry the URock model |
Beta Was this translation helpful? Give feedback.
-
OK two questions for you:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to use URock to ultimately create a PET map. However, after installing Java and restarting QGIS and my computer, I am running into the following issue: URock seems to be looking for Java in the wrong place. Is this a known issue? And how can I overcome this?
I am using UMEP 4.1.1 and UMEP for processing 2.0.35. I downloaded the following version of Java: https://download.oracle.com/java/23/latest/jdk-23_windows-x64_bin.exe
QGIS versie: 3.34.14-Prizren
QGIS coderevisie: 0cdaf6d9
Qt versie: 5.15.13
Python versie: 3.12.8
GDAL versie: 3.9.3
GEOS versie: 3.13.0-CAPI-1.19.0
PROJ versie: Rel. 9.5.0, September 15th, 2024
PDAL versie: 2.8.1 (git-version: a06325)
Algoritme begonnen om: 2025-02-18T15:30:35
Algoritme 'Urban Wind Field: URock v2023a' starten...
Parameters invoer:
{ 'ATTENUATION_FIELD' : '', 'BUILDINGS' : 'C:/Users/h.severiens/OneDrive - Merosch/Documenten/GIS Haarrijn schaduwberekening/GIS_PET/gebouwen2.gpkg|layername=gebouwen2', 'HEIGHT_FIELD_BUILD' : 'hoogte_ahn', 'HORIZONTAL_RESOLUTION' : 1, 'INPUT_PROFILE_FILE' : '', 'INPUT_PROFILE_TYPE' : 0, 'INPUT_WIND_DIRECTION' : 140, 'INPUT_WIND_HEIGHT' : 10, 'INPUT_WIND_SPEED' : 6, 'LOAD_OUTPUT' : True, 'OUTPUT_FILENAME' : 'urock_output', 'RASTER_OUTPUT' : None, 'SAVE_NETCDF' : True, 'SAVE_RASTER' : True, 'SAVE_VECTOR' : True, 'UROCK_OUTPUT' : 'C:\Users\h.severiens\OneDrive - Merosch\Documenten\GIS Haarrijn schaduwberekening\GIS_PET\urock_output', 'VEGETATION' : 'C:/Users/h.severiens/OneDrive - Merosch/Documenten/GIS Haarrijn schaduwberekening/GIS_PET/veg_ahn_mean.gpkg', 'VEGETATION_CROWN_BASE_HEIGHT' : '', 'VEGETATION_CROWN_TOP_HEIGHT' : 'ahn', 'VERTICAL_RESOLUTION' : 1, 'WIND_HEIGHT' : '1.5' }
Traceback (most recent call last):
File "C:\Users/h.severiens/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\URock\H2gisConnection.py", line 349, in getJavaHome
java_key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\JavaSoft\Java Runtime Environment")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] Het systeem kan het opgegeven bestand niet vinden
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users/h.severiens/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\URock\H2gisConnection.py", line 353, in getJavaHome
java_key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\JavaSoft\Java Development Kit")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] Het systeem kan het opgegeven bestand niet vinden
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users/h.severiens/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\processor\urock_processing_algorithm.py", line 324, in processAlgorithm
javaDirDefault = getJavaDir(plugin_directory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users/h.severiens/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\URock\H2gisConnection.py", line 234, in getJavaDir
javaPath = getJavaHome(os_type)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users/h.severiens/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\processing_umep\functions\URock\H2gisConnection.py", line 356, in getJavaHome
exit()
File "", line 26, in call
SystemExit: None
Execution failed after 0.06 seconden
Resultaatlagen laden
Algoritme 'Urban Wind Field: URock v2023a' voltooid
Beta Was this translation helpful? Give feedback.
All reactions