[Geoserver-users] Cannot get gdal plugin ECW to work - Ubuntu 12.04

Hi folks,
I compiled GDAL with ECW support under Ubuntu 12.04 for use with
geoserver 2.3.4. I followed the instructions at
http://docs.geoserver.org/stable/en/user/data/raster/gdal.html
But the ECW store doesn't show up in the admin interface. I also set
LD_LIBRARY_PATH and GDAL_DATA in /etc/environment but nothing seems to
work.

Is there anybody that has a succesfull ECW implementation that wants
to share some hints? Technical information is attached inline.

Kind regards,

Milo

-----------------
GDAL

./configure --with-ecw=/usr/local --with-java=/usr/local/java/jdk1.6.0_45/

Output is then:

GDAL is now configured for x86_64-unknown-linux-gnu

  Installation directory: /usr/local
  C compiler: gcc -g -O2 -DHAVE_SSE_AT_COMPILE_TIME
  C++ compiler: g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME

  LIBTOOL support: yes

  LIBZ support: internal
  LIBLZMA support: no
  GRASS support: no
  CFITSIO support: no
  PCRaster support: internal
  LIBPNG support: internal
  DDS support: no
  GTA support: no
  LIBTIFF support: internal (BigTIFF=yes)
  LIBGEOTIFF support: internal
  LIBJPEG support: internal
  12 bit JPEG: yes
  12 bit JPEG-in-TIFF: yes
  LIBGIF support: internal
  OGDI support: no
  HDF4 support: no
  HDF5 support: no
  NetCDF support: no
  Kakadu support: no
  JasPer support: no
  OpenJPEG support: no
  ECW support: yes
  MrSID support: no
  MrSID/MG4 Lidar support: no
  MSG support: no
  GRIB support: yes
  EPSILON support: no
  WebP support: no
  cURL support (wms/wcs/...):no
  PostgreSQL support: no
  MySQL support: no
  Ingres support: no
  Xerces-C support: no
  NAS support: no
  Expat support: no
  libxml2 support: no
  Google libkml support: no
  ODBC support: no
  PGeo support: no
  FGDB support: no
  MDB support: no
  PCIDSK support: internal
  OCI support: no
  GEORASTER support: no
  SDE support: no
  Rasdaman support: no
  DODS support: no
  SQLite support: no
  PCRE support: no
  SpatiaLite support: no
  DWGdirect support no
  INFORMIX DataBlade support:no
  GEOS support: no
  Poppler support: no
  Podofo support: no
  OpenCL support: no
  Armadillo support: no
  FreeXL support: no

  SWIG Bindings: no

  Statically link PROJ.4: no
  enable OGR building: yes
  enable pthread support: yes
  enable POSIX iconv support:yes
  hide internal symbols: no

gdalinfo --formats | grep ECW

ECW (rw): ERDAS Compressed Wavelets (SDK 3.x)
JP2ECW (rw+v): ERDAS JPEG2000 (SDK 3.x)

gdal-config --version

1.10.0

2013-08-22 01:37:09,930 INFO [xml.XmlBeanDefinitionReader] - Loading
XML bean definitions from URL
[jar:file:/var/lib/tomcat6/webapps/geoserver/WEB-INF/lib/gdal-2.3.4.jar!/applicationContext.xml]
2013-08-22 01:37:21,672 DEBUG [gdal.dted] - DTEDFormatFactory is not availaible.
2013-08-22 01:37:21,672 DEBUG [gdal.jp2mrisd] - JP2MrSIDFormatFactory
is not availaible.
2013-08-22 01:37:21,672 DEBUG [gdal.envihdr] - EnviHdrFormatFactory is
not availaible.
2013-08-22 01:37:21,673 DEBUG [gdal.mrsid] - MrSIDFormatFactory is not
availaible.
2013-08-22 01:37:21,673 DEBUG [gdal.ecw] - ECWFormatFactory is not availaible.
2013-08-22 01:37:21,673 DEBUG [gdal.nitf] - NITFFormatFactory is not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.jp2k] - JP2KFormatFactory is not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.rpftoc] - RPFTOCFormatFactory is
not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.jp2ecw] - JP2ECWFormatFactory is
not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.erdasimg] - ErdasImgFormatFactory
is not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.ehdr] - EsriHdrFormatFactory is
not availaible.

Ciao Milo,
a few questions:

-1- did you use the prebuilt packages that comes with ImageIO-Ext
-2- Did you match the GCC version on your system? (assuming we have
the right one)
-3- Did you try running the Java gdalinfo util we ship with the libs?

I kind of believe you are trying to run the GDAL extension against the
GDAL installed on your machine which does not have SWIG (JNI) bindings
(see the line SWIG Bindings: no) hence it is going be
impossible for GeoServer to make use of it.

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

On Thu, Aug 22, 2013 at 1:49 AM, Milo van der Linden <milo@anonymised.com> wrote:

Hi folks,
I compiled GDAL with ECW support under Ubuntu 12.04 for use with
geoserver 2.3.4. I followed the instructions at
http://docs.geoserver.org/stable/en/user/data/raster/gdal.html
But the ECW store doesn't show up in the admin interface. I also set
LD_LIBRARY_PATH and GDAL_DATA in /etc/environment but nothing seems to
work.

Is there anybody that has a succesfull ECW implementation that wants
to share some hints? Technical information is attached inline.

Kind regards,

Milo

-----------------
GDAL

./configure --with-ecw=/usr/local --with-java=/usr/local/java/jdk1.6.0_45/

Output is then:

GDAL is now configured for x86_64-unknown-linux-gnu

  Installation directory: /usr/local
  C compiler: gcc -g -O2 -DHAVE_SSE_AT_COMPILE_TIME
  C++ compiler: g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME

  LIBTOOL support: yes

  LIBZ support: internal
  LIBLZMA support: no
  GRASS support: no
  CFITSIO support: no
  PCRaster support: internal
  LIBPNG support: internal
  DDS support: no
  GTA support: no
  LIBTIFF support: internal (BigTIFF=yes)
  LIBGEOTIFF support: internal
  LIBJPEG support: internal
  12 bit JPEG: yes
  12 bit JPEG-in-TIFF: yes
  LIBGIF support: internal
  OGDI support: no
  HDF4 support: no
  HDF5 support: no
  NetCDF support: no
  Kakadu support: no
  JasPer support: no
  OpenJPEG support: no
  ECW support: yes
  MrSID support: no
  MrSID/MG4 Lidar support: no
  MSG support: no
  GRIB support: yes
  EPSILON support: no
  WebP support: no
  cURL support (wms/wcs/...):no
  PostgreSQL support: no
  MySQL support: no
  Ingres support: no
  Xerces-C support: no
  NAS support: no
  Expat support: no
  libxml2 support: no
  Google libkml support: no
  ODBC support: no
  PGeo support: no
  FGDB support: no
  MDB support: no
  PCIDSK support: internal
  OCI support: no
  GEORASTER support: no
  SDE support: no
  Rasdaman support: no
  DODS support: no
  SQLite support: no
  PCRE support: no
  SpatiaLite support: no
  DWGdirect support no
  INFORMIX DataBlade support:no
  GEOS support: no
  Poppler support: no
  Podofo support: no
  OpenCL support: no
  Armadillo support: no
  FreeXL support: no

  SWIG Bindings: no

  Statically link PROJ.4: no
  enable OGR building: yes
  enable pthread support: yes
  enable POSIX iconv support:yes
  hide internal symbols: no

gdalinfo --formats | grep ECW

ECW (rw): ERDAS Compressed Wavelets (SDK 3.x)
JP2ECW (rw+v): ERDAS JPEG2000 (SDK 3.x)

gdal-config --version

1.10.0

2013-08-22 01:37:09,930 INFO [xml.XmlBeanDefinitionReader] - Loading
XML bean definitions from URL
[jar:file:/var/lib/tomcat6/webapps/geoserver/WEB-INF/lib/gdal-2.3.4.jar!/applicationContext.xml]
2013-08-22 01:37:21,672 DEBUG [gdal.dted] - DTEDFormatFactory is not availaible.
2013-08-22 01:37:21,672 DEBUG [gdal.jp2mrisd] - JP2MrSIDFormatFactory
is not availaible.
2013-08-22 01:37:21,672 DEBUG [gdal.envihdr] - EnviHdrFormatFactory is
not availaible.
2013-08-22 01:37:21,673 DEBUG [gdal.mrsid] - MrSIDFormatFactory is not
availaible.
2013-08-22 01:37:21,673 DEBUG [gdal.ecw] - ECWFormatFactory is not availaible.
2013-08-22 01:37:21,673 DEBUG [gdal.nitf] - NITFFormatFactory is not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.jp2k] - JP2KFormatFactory is not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.rpftoc] - RPFTOCFormatFactory is
not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.jp2ecw] - JP2ECWFormatFactory is
not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.erdasimg] - ErdasImgFormatFactory
is not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.ehdr] - EsriHdrFormatFactory is
not availaible.

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hello Simone, thank you for responding.

I ran this setup:

---------------
unzip libecwj2-3.3-2006-09-06.zip
patch -p0 < libecwj2-3.3-msvc90-fixes.patch
patch -p0 < libecwj2-3.3-NCSPhysicalMemorySize-Linux.patch
patch -p0 < libecwj2-3.3-wcharfix.patch
cd libecwj2-3.3
./configure
make
make install
cd ..
cd gdal-1.10.0
./configure --with-ecw=/usr/local --with-java=/usr/local/java/jdk1.6.0_45/
make
make install
---------------

And then did:

---------------
java -classpath
/var/lib/tomcat6/webapps/geoserver/WEB-INF/lib/imageio-ext-gdal-bindings-1.9.2.jar:.
/home/ftp/geodata/data/luchtfoto/Boxmeer/FL12063_Boxmeer.ecw
Exception in thread "main" java.lang.NoClassDefFoundError:
/home/ftp/geodata/data/luchtfoto/Boxmeer/FL12063_Boxmeer/ecw
Caused by: java.lang.ClassNotFoundException:
.home.ftp.geodata.data.luchtfoto.Boxmeer.FL12063_Boxmeer.ecw
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class:
/home/ftp/geodata/data/luchtfoto/Boxmeer/FL12063_Boxmeer.ecw. Program
will exit.
---------------

2013/8/26 Simone Giannecchini <simone.giannecchini@anonymised.com>:

Ciao Milo,
a few questions:

-1- did you use the prebuilt packages that comes with ImageIO-Ext
-2- Did you match the GCC version on your system? (assuming we have
the right one)
-3- Did you try running the Java gdalinfo util we ship with the libs?

I kind of believe you are trying to run the GDAL extension against the
GDAL installed on your machine which does not have SWIG (JNI) bindings
(see the line SWIG Bindings: no) hence it is going be
impossible for GeoServer to make use of it.

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

On Thu, Aug 22, 2013 at 1:49 AM, Milo van der Linden <milo@anonymised.com> wrote:

Hi folks,
I compiled GDAL with ECW support under Ubuntu 12.04 for use with
geoserver 2.3.4. I followed the instructions at
http://docs.geoserver.org/stable/en/user/data/raster/gdal.html
But the ECW store doesn't show up in the admin interface. I also set
LD_LIBRARY_PATH and GDAL_DATA in /etc/environment but nothing seems to
work.

Is there anybody that has a succesfull ECW implementation that wants
to share some hints? Technical information is attached inline.

Kind regards,

Milo

-----------------
GDAL

./configure --with-ecw=/usr/local --with-java=/usr/local/java/jdk1.6.0_45/

Output is then:

GDAL is now configured for x86_64-unknown-linux-gnu

  Installation directory: /usr/local
  C compiler: gcc -g -O2 -DHAVE_SSE_AT_COMPILE_TIME
  C++ compiler: g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME

  LIBTOOL support: yes

  LIBZ support: internal
  LIBLZMA support: no
  GRASS support: no
  CFITSIO support: no
  PCRaster support: internal
  LIBPNG support: internal
  DDS support: no
  GTA support: no
  LIBTIFF support: internal (BigTIFF=yes)
  LIBGEOTIFF support: internal
  LIBJPEG support: internal
  12 bit JPEG: yes
  12 bit JPEG-in-TIFF: yes
  LIBGIF support: internal
  OGDI support: no
  HDF4 support: no
  HDF5 support: no
  NetCDF support: no
  Kakadu support: no
  JasPer support: no
  OpenJPEG support: no
  ECW support: yes
  MrSID support: no
  MrSID/MG4 Lidar support: no
  MSG support: no
  GRIB support: yes
  EPSILON support: no
  WebP support: no
  cURL support (wms/wcs/...):no
  PostgreSQL support: no
  MySQL support: no
  Ingres support: no
  Xerces-C support: no
  NAS support: no
  Expat support: no
  libxml2 support: no
  Google libkml support: no
  ODBC support: no
  PGeo support: no
  FGDB support: no
  MDB support: no
  PCIDSK support: internal
  OCI support: no
  GEORASTER support: no
  SDE support: no
  Rasdaman support: no
  DODS support: no
  SQLite support: no
  PCRE support: no
  SpatiaLite support: no
  DWGdirect support no
  INFORMIX DataBlade support:no
  GEOS support: no
  Poppler support: no
  Podofo support: no
  OpenCL support: no
  Armadillo support: no
  FreeXL support: no

  SWIG Bindings: no

  Statically link PROJ.4: no
  enable OGR building: yes
  enable pthread support: yes
  enable POSIX iconv support:yes
  hide internal symbols: no

gdalinfo --formats | grep ECW

ECW (rw): ERDAS Compressed Wavelets (SDK 3.x)
JP2ECW (rw+v): ERDAS JPEG2000 (SDK 3.x)

gdal-config --version

1.10.0

2013-08-22 01:37:09,930 INFO [xml.XmlBeanDefinitionReader] - Loading
XML bean definitions from URL
[jar:file:/var/lib/tomcat6/webapps/geoserver/WEB-INF/lib/gdal-2.3.4.jar!/applicationContext.xml]
2013-08-22 01:37:21,672 DEBUG [gdal.dted] - DTEDFormatFactory is not availaible.
2013-08-22 01:37:21,672 DEBUG [gdal.jp2mrisd] - JP2MrSIDFormatFactory
is not availaible.
2013-08-22 01:37:21,672 DEBUG [gdal.envihdr] - EnviHdrFormatFactory is
not availaible.
2013-08-22 01:37:21,673 DEBUG [gdal.mrsid] - MrSIDFormatFactory is not
availaible.
2013-08-22 01:37:21,673 DEBUG [gdal.ecw] - ECWFormatFactory is not availaible.
2013-08-22 01:37:21,673 DEBUG [gdal.nitf] - NITFFormatFactory is not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.jp2k] - JP2KFormatFactory is not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.rpftoc] - RPFTOCFormatFactory is
not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.jp2ecw] - JP2ECWFormatFactory is
not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.erdasimg] - ErdasImgFormatFactory
is not availaible.
2013-08-22 01:37:21,675 DEBUG [gdal.ehdr] - EsriHdrFormatFactory is
not availaible.

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users