Dear list

Does anyone make use of the OGR datastore extension:
https://docs.geoserver.org/latest/en/user/community/ogr-store/index.html
(or GDAL Image Formats:
https://docs.geoserver.org/stable/en/user/data/raster/gdal.html)?

I am getting the errors:

Native library load failed.
> java.lang.UnsatisfiedLinkError: no ogrjni in java.library.path
> Native library load failed.
> java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path
>

when GeoServer starts up. And obviously OGR is not listed as a datastore.

I am running on Tomcat on Ubuntu.  I have installed gdal-bin, libgdal-dev
and libgdal-java. I have set GDAL_DATA and LD_LIBRARY_PATH in Tomcat's
setenv.sh and restarted Tomcat:

export GDAL_DATA="/usr/share/gdal"
>>
>> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/:/usr/lib/jni/
>>
> export PATH=$PATH:/usr/lib/:/usr/lib/jni/   # does not help.
>>
>
I have noticed that there are no files called ogrjni nor gdaljni on the
file system, and definitely not in /usr/lib/jni (only these 2 files):

root@devtomcat0:/usr/lib/jni# ll
> total 1088
> drwxr-xr-x  2 root root   4096 Feb 15 17:44 ./
> drwxr-xr-x 89 root root   4096 Mar 24 19:08 ../
> -rw-r--r--  1 root root 551000 Mar 29  2020 libgdalalljni.so
> -rw-r--r--  1 root root 551000 Mar 29  2020 libgdalalljni.so.26
>

In /usr/lib/ I find:

> root@devtomcat0:/usr/lib# ll libgdal*
> -rw-r--r-- 1 root root 50018498 Mar 29  2020 libgdal.a
> lrwxrwxrwx 1 root root       17 Mar 29  2020 libgdal.so ->
> libgdal.so.26.0.4
> lrwxrwxrwx 1 root root       17 Mar 29  2020 libgdal.so.26 ->
> libgdal.so.26.0.4
> -rw-r--r-- 1 root root 20197488 Mar 29  2020 libgdal.so.26.0.4
>
so I am fairly sure that LD_LIBRARY_PATH should be /usr/lib/ - is that
correct?

In the GeoServer lib directory, I have:

> root@devtomcat0:/opt/tomcat/webapps/mapservice/WEB-INF/lib# ll *ogr-*
> -rw-r--r-- 1 root root 11584 Feb 15 17:05 gs-web-ogr-2.20-SNAPSHOT.jar
> -rw-r--r-- 1 root root 55134 Feb 15 17:05 gt-ogr-core-26-SNAPSHOT.jar
> -rw-r--r-- 1 root root 11858 Feb 15 17:05 gt-ogr-jni-26-SNAPSHOT.jar
>

In the GDAL Image Formats documentation, it states:

> If new formats do not appear in the GUI and you see the following message
> in the log file:
>
> *it.geosolutions.imageio.gdalframework.GDALUtilities loadGDAL WARNING:
> Native library load failed.java.lang.UnsatisfiedLinkError: no gdaljni in
> java.library.path* WARNING: Native library load
> failed.java.lang.UnsatisfiedLinkError: no gdalalljni in java.library.path*
>
> that means that the installations failed for some reason.
>
Any thoughts on how the installation failed, or what is not set up
correctly, or what else I can try to get this working?

Thank you

Peter
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to