in a server with centos 7, tomcat8, java 1.8.0_121, geoserver v.2.10.1, i followed this link to install the gdal plugin:http://docs.geoserver.org/latest/en/user/data/raster/gdal.html

i can see the list of the stores including the ecw store. but when i try to select the store geoserver crashes and restart.

I've tryed the gdalinfo command to check the file. With all the files i tested i have the same error:

terminate called after throwing an instance of 'std::length_error' what(): basic_string::_S_create gdalinfo.sh: line 5: 19137 Aborted (core dumped) java -classpath "${CLASSPATH}" gdalinfo $input

i've searched in everywhere and it seems to me that this is a bug in the gdal plugin.

Is it possible to view an ECW file in a GeoServer installed on a centos server?

  • can you view the ecw file with your gdal install?
    – Ian Turton
    Commented Feb 3, 2017 at 13:10
  • how i could do it? i have only geoserver installed on the server.
    – Michi
    Commented Feb 3, 2017 at 13:26
  • 1
    $ gdalinfo --formats | sort can you see ecw driver in the list? It is very possible that your gdal was build w/out ecw support (ecw is a proprietary driver after all - consume .tiff if possible)
    – nickves
    Commented Feb 3, 2017 at 13:28
  • No. In effect, i can't see any ECW driver in the list. How could i add it?
    – Michi
    Commented Feb 3, 2017 at 13:37
  • 1
    You need to compile GDAL with ecw support, since there are only few and outdated Linux packages available that include ecw. trac.osgeo.org/gdal/wiki/ECW and surfaces.co.il/gdal-and-ecw-on-centos-5 might lead you towards your aim.
    – AndreJ
    Commented Feb 3, 2017 at 14:39

1 Answer 1


I followed the tips of Andrej, iant e nickves (thank you guys) and i've tryed to install GDAL with ecw support. if check the list of the driver with the command:

$ gdalinfo --formats | sort

i can't find the ECW driver, but now, if i use the gdalinfo.sh command in the gdal192\javainfo folder i don't see the error anymore and i receive the following answer:

# sh gdalinfo.sh /root/Downloads/3741011.ecw

Driver: ECW/ERDAS Compressed Wavelets (SDK 3.x) Files: /root/Downloads/3741011.ecw Size is 12194, 9992 Coordinate System is `' Origin = (290747.225122,4641666.725122) Pixel Size = (0.15,-0.15) Corner Coordinates: Upper Left (290747.225122,4641666.725122) Lower Left (290747.225122,4640167.925122) Upper Right (292576.32512199995,4641666.725122) Lower Right (292576.32512199995,4640167.925122) Center (291661.77512199996,4640917.325122) Band 1 Block=12194x1 Type=Byte, ColorInterp=Red Overviews: 6097x4996, 3048x2498, 1524x1249, 762x624, 381x312, 190x156 Band 2 Block=12194x1 Type=Byte, ColorInterp=Green Overviews: 6097x4996, 3048x2498, 1524x1249, 762x624, 381x312, 190x156 Band 3 Block=12194x1 Type=Byte, ColorInterp=Blue Overviews: 6097x4996, 3048x2498, 1524x1249, 762x624, 381x312, 190x156

that seems ok. now, when i try with geoserver it still crashes.

Maybe i have to point the LD_LIBRARY_PATH variable path to some other folder?

Thank you for your help.

--> UPDATE: restarted tomcat and everything is working fine! Thank you all

  • Is there any step by step documents which you had followed?
    – User123
    Commented Aug 9, 2017 at 4:57
  • no. i couldn't find any documentation that explains step by step what is needed to do in order to make the ecw working with geoserver...
    – Michi
    Commented Feb 16, 2019 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.