Odd SQLite error when reading WMS capabilities on Windows 11

Hi,

My computer was upgraded to run Windows 11, and maybe because of that change the WMS GetCapabilities requests started to fail. I tried several versions (2.24.1, 2.25.3, 2.26.0), all installed with bin-zip file and they all have been running OK.

GeoServer seems to start without issues, and WMTS and WFS GetCapabilities requests work normally. But WMS GetCapablities fail with an error "java.lang.UnsatisfiedLinkError: ‘void org.sqlite.core.NativeDB._open_utf8(byte, int)’ ‘void org.sqlite.core.NativeDB._open_utf8(byte, int)’ "

The error log show more information:

Request: getCapabilities
AcceptLanguages = null
BaseUrl = http://localhost:8080/geoserver/
Get = false
Namespace = null
RawKvp = {REQUEST=GetCapabilities, VERSION=1.3.0, SERVICE=WMS}
Request = GetCapabilities
RequestCharset = null
RootLayerEnabled = null
UpdateSequence = null
Version = 1.3.0
Failed to load native library:sqlite-3.41.2.2-e00e7067-2d35-46ac-afa7-a3e43b1342d3-sqlitejdbc.dll. osinfo: Windows/x86_64
java.lang.UnsatisfiedLinkError: C:\Users\JRAHKONEN\AppData\Local\Temp\sqlite-3.41.2.2-e00e7067-2d35-46ac-afa7-a3e43b1342d3-sqlitejdbc.dll: group policy prevents running this program

Well, I think that the immediate reason for the error is that after the upgrade I do not have correct rights to the C:\Users\JRAHKONEN\AppData\Local\Temp\ directory. But I wonder why SQLite is needed at all for generating WMS GetCapabilities.

The full error log is attached.

-Jukka Rahkonen-

getcapabilities_error_log.txt (31.9 KB)

Ok, I resolved the issue. The SQLite-JDBC driver extracts the native library (on Windows the .dll file) into the directory that is defined by JVM property java.io.tmpdir. The directory can be changed to something else with org.sqlite.tmpdir JVM property.
What I did was to edit the GeoServer startup.bat file
"%RUN_JAVA%" %JAVA_OPTS% -DGEOSERVER_DATA_DIR="%GEOSERVER_DATA_DIR%" -Dorg.sqlite.tmpdir=c:/good_directory

-Jukka Rahkonen-

1 Like

Hi Jukka,
yes, I agree that’s very likely the case but wondering why the issue was there… did the temp directory
become non writable, or plain non existent when upgrading Windows?

We had several major updates going on at the same time in our agancy. Upgrade to Windows 11 was the biggest one but my trouble was caused by somehow hardened security policies.
The user’s default temp directory exists and it is writable, otherwise I think it would be hard to use Windows but all. Geoserver was allowed to write the sqlitejdbc.dll file into the temp directory, but our new group policy prevents running code from that directory, including code from the extracted .dll.

-Jukka-