Ingest GeoTIFF using geomesa-accumulo

231 views Asked by At

I am trying to ingest geotiff data using geomesa-accumulo but getting the following error:

WARNING: Failed to load the GDAL native libs. This is not a problem unless you need to use the GDAL plugins: they won't be enabled. java.lang.UnsatisfiedLinkError: no gdaljni in java.library.path

I tried the following commands

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/libgdal.so
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni/libgdaljni.so
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/test/Project/2.0.2-geomesa/geotools/

After adding this, I verified whether everything is correct in the library path, using the following command

java -XshowSettings:properties

I created gdal.jar file after compiling gdal-2.3.0 source file which i have added in java.library.path, I've also added 'geotoolsinjava.library.path. Myjava.library.path` looks as below

  java.library.path = 
        /usr/lib/jni/libgdaljni.so
        /usr/lib/
        /usr/lib/libgdal.so
        /usr/java/packages/lib/amd64
        /usr/lib64
        /lib64
        /lib
        /usr/lib 
        /usr/local/lib/gdal
        /home/test/Project/2.0.2-geomesa/geotools/

Kindly help me to solve the warning that is shown. Any help is much appreciated.

UPDATE

As @Emilio suggested, I've tried adding /usr/lib/jni/ along with the previous commands. My, updated commands are as follows.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/test/Project/2.0.2-geomesa/geotools/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/libgdal.so
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni/libgdaljni.so
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/gdal

and my updated java.library.path is as shown below.

 java.library.path = 
        /usr/lib/jni/
        /usr/lib/
        /home/test/Project/2.0.2-geomesa/geotools/
        /usr/lib/libgdal.so
        /usr/lib/
        /usr/lib/jni/libgdaljni.so
        /usr/local/lib/gdal
        /usr/java/packages/lib/amd64
        /usr/lib64
        /lib64
        /lib
        /usr/lib

Now, I'm getting a new error message as

Native library load failed. java.lang.UnsatisfiedLinkError: no gdalalljni in java.library.path Nov 13, 2018 11:11:51 PM it.geosolutions.imageio.gdalframework.GDALUtilities loadGDAL WARNING: Failed to load the GDAL native libs. This is not a problem unless you need to use the GDAL plugins: they won't be enabled. java.lang.UnsatisfiedLinkError: org.gdal.gdal.gdalJNI.AllRegister()V

There is still no errors shown in the geomesa log file.

1

There are 1 answers

2
Emilio Lahr-Vivaz On

I think that you need to point to the folder containing the native library, so in your case /usr/lib/jni/