Thanks,
even when adding the dependencies:

https://github.com/geotools/geotools/blob/master/modules/plugin/arcgrid/pom.xml


compile group: 'org.geotools', name: 'gt-coverage', version: '18.4'
compile group: 'it.geosolutions.imageio-ext', name:
'imageio-ext-arcgrid', version: '1.1.15'
compile group: 'javax.media', name: 'jai_imageio', version: '1.1.1'

the error remains the same.

To reproduce:
git clone g...@github.com:geoHeil/vectorizePolygons.git
cd vectorizePolygons
make run-java

Best,
Georg

Andrea Aime <andrea.a...@geo-solutions.it> schrieb am Di., 31. Juli 2018 um
09:37 Uhr:

> I think the problem is that jai_imageio is marked as "test", but in order
> to actually run,
> it should be marked as compile:
>
> [INFO] +- javax.media:jai_imageio:jar:1.1:test
>
> The dependency tree I reported is the one for this pom:
>
> https://github.com/geotools/geotools/blob/master/modules/plugin/arcgrid/pom.xml
>
> Cheers
> Andrea
>
> On Tue, Jul 31, 2018 at 9:34 AM Georg Heiler <georg.kf.hei...@gmail.com>
> wrote:
>
>> I.e. vectorbin is already on my class path.
>>
>>
>> t.geosolutions.jaiext.vectorbin:jt-vectorbin:1.0.16
>> +--- it.geosolutions.jaiext.scale:jt-scale:1.0.16
>> |    +--- org.geotools:gt-coverage:18.4
>> |    |    +--- org.geotools:gt-arcgrid:18.4
>> |    |    |    \--- compileClasspath
>> |    |    \--- org.geotools:gt-render:18.4
>> |    |         \--- org.geotools:gt-process-raster:18.4
>> |    |              \--- compileClasspath
>> |    \--- it.geosolutions.jaiext.affine:jt-affine:1.0.16
>> |         \--- org.geotools:gt-coverage:18.4 (*)
>> \--- org.geotools:gt-coverage:18.4 (*)
>>
>>
>> Georg Heiler <georg.kf.hei...@gmail.com> schrieb am Di., 31. Juli 2018
>> um 09:27 Uhr:
>>
>>> Which jars did you specify in the POM? Which dependencies would you
>>> recommend for maven?
>>>
>>> Best,
>>> Georg
>>>
>>> Andrea Aime <andrea.a...@geo-solutions.it> schrieb am Di., 31. Juli
>>> 2018 um 09:21 Uhr:
>>>
>>>> There is no way around it, you have to put the ImageIO jar in the
>>>> classpath.
>>>> You can find it in the OSGeo repository:
>>>> https://download.osgeo.org/webdav/geotools/javax/media/jai_imageio/
>>>>
>>>> Generally speaking, best to use Maven, GeoTools has many dependecies.
>>>> In case you cannot,
>>>> here is a dependency tree for the arcgrid module (you likely need all
>>>> jars marked as "compile" dependency):
>>>>
>>>> [INFO] Scanning for projects...
>>>> [INFO]
>>>> [INFO] ----------------------< org.geotools:gt-arcgrid
>>>> >-----------------------
>>>> [INFO] Building ArcGrid datasource module 20-SNAPSHOT
>>>> [INFO] --------------------------------[ jar
>>>> ]---------------------------------
>>>> [INFO]
>>>> [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ gt-arcgrid
>>>> ---
>>>> [INFO] org.geotools:gt-arcgrid:jar:20-SNAPSHOT
>>>> [INFO] +- org.geotools:gt-main:jar:20-SNAPSHOT:compile
>>>> [INFO] |  +- org.geotools:gt-api:jar:20-SNAPSHOT:compile
>>>> [INFO] |  +- org.locationtech.jts:jts-core:jar:1.15.1:compile
>>>> [INFO] |  \- org.jdom:jdom2:jar:2.0.6:compile
>>>> [INFO] +- org.geotools:gt-coverage:jar:20-SNAPSHOT:compile
>>>> [INFO] |  +- org.geotools:gt-referencing:jar:20-SNAPSHOT:compile
>>>> [INFO] |  |  +- org.ejml:ejml-ddense:jar:0.32:compile
>>>> [INFO] |  |  |  \- org.ejml:ejml-core:jar:0.32:compile
>>>> [INFO] |  |  +- commons-pool:commons-pool:jar:1.5.4:compile
>>>> [INFO] |  |  +- org.geotools:gt-metadata:jar:20-SNAPSHOT:compile
>>>> [INFO] |  |  |  \- org.geotools:gt-opengis:jar:20-SNAPSHOT:compile
>>>> [INFO] |  |  |     \- systems.uom:systems-common-java8:jar:0.7.2:compile
>>>> [INFO] |  |  |        +- tec.uom:uom-se:jar:1.0.8:compile
>>>> [INFO] |  |  |        |  +- javax.measure:unit-api:jar:1.0:compile
>>>> [INFO] |  |  |        |  \- tec.uom.lib:uom-lib-common:jar:1.0.2:compile
>>>> [INFO] |  |  |        +- si.uom:si-quantity:jar:0.7.1:compile
>>>> [INFO] |  |  |        \- si.uom:si-units-java8:jar:0.7.1:compile
>>>> [INFO] |  |  +- jgridshift:jgridshift:jar:1.0:compile
>>>> [INFO] |  |  \- net.sf.geographiclib:GeographicLib-Java:jar:1.44:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.imageio-ext:imageio-ext-tiff:jar:1.1.24:compile
>>>> [INFO] |  |  \-
>>>> it.geosolutions.imageio-ext:imageio-ext-geocore:jar:1.1.24:compile
>>>> [INFO] |  +- org.jaitools:jt-zonalstats:jar:1.5.0:compile
>>>> [INFO] |  +- org.jaitools:jt-utils:jar:1.5.0:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.affine:jt-affine:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.algebra:jt-algebra:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.bandmerge:jt-bandmerge:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.bandselect:jt-bandselect:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.bandcombine:jt-bandcombine:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.border:jt-border:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.buffer:jt-buffer:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.crop:jt-crop:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.iterators:jt-iterators:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.lookup:jt-lookup:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.mosaic:jt-mosaic:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.nullop:jt-nullop:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.rescale:jt-rescale:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.scale:jt-scale:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.scale2:jt-scale2:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.stats:jt-stats:jar:1.1.1:compile
>>>> [INFO] |  |  \- com.google.guava:guava:jar:25.1-jre:compile
>>>> [INFO] |  |     +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
>>>> [INFO] |  |     +- org.checkerframework:checker-qual:jar:2.0.0:compile
>>>> [INFO] |  |     +-
>>>> com.google.errorprone:error_prone_annotations:jar:2.1.3:compile
>>>> [INFO] |  |     +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
>>>> [INFO] |  |     \-
>>>> org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.translate:jt-translate:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.utilities:jt-utilities:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.warp:jt-warp:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.zonal:jt-zonal:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.binarize:jt-binarize:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.format:jt-format:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.colorconvert:jt-colorconvert:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.errordiffusion:jt-errordiffusion:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.orderdither:jt-orderdither:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.colorindexer:jt-colorindexer:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.imagefunction:jt-imagefunction:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.piecewise:jt-piecewise:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.classifier:jt-classifier:jar:1.1.1:compile
>>>> [INFO] |  +- it.geosolutions.jaiext.rlookup:jt-rlookup:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.vectorbin:jt-vectorbin:jar:1.1.1:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.jaiext.shadedrelief:jt-shadedrelief:jar:1.1.1:compile
>>>> [INFO] |  \- commons-io:commons-io:jar:2.6:compile
>>>> [INFO] +- org.geotools:gt-epsg-hsql:jar:20-SNAPSHOT:test
>>>> [INFO] |  \- org.hsqldb:hsqldb:jar:2.4.1:test
>>>> [INFO] +-
>>>> it.geosolutions.imageio-ext:imageio-ext-arcgrid:jar:1.1.24:compile
>>>> [INFO] |  +-
>>>> it.geosolutions.imageio-ext:imageio-ext-streams:jar:1.1.24:compile
>>>> [INFO] |  \-
>>>> it.geosolutions.imageio-ext:imageio-ext-utilities:jar:1.1.24:compile
>>>> [INFO] +- org.geotools:gt-sample-data:jar:20-SNAPSHOT:test
>>>> [INFO] +- javax.media:jai_codec:jar:1.1.3:test
>>>> [INFO] +- javax.media:jai_imageio:jar:1.1:test
>>>> [INFO] +- javax.media:jai_core:jar:1.1.3:compile
>>>> [INFO] \- junit:junit:jar:4.11:test
>>>> [INFO]    \- org.hamcrest:hamcrest-core:jar:1.3:test
>>>> [INFO]
>>>> ------------------------------------------------------------------------
>>>> [INFO] BUILD SUCCESS
>>>> [INFO]
>>>> ------------------------------------------------------------------------
>>>> [INFO] Total time: 0.995 s
>>>> [INFO] Finished at: 2018-07-31T09:20:09+02:00
>>>> [INFO]
>>>> ------------------------------------------------------------------------
>>>>
>>>> Cheers
>>>> Andrea
>>>>
>>>>
>>>> On Tue, Jul 31, 2018 at 9:09 AM Georg Heiler <georg.kf.hei...@gmail.com>
>>>> wrote:
>>>>
>>>>> I get ClassDefNotFoundError.
>>>>>
>>>>> To better reproduce the problem I created a minimal reproducible
>>>>> example: https://github.com/geoHeil/vectorizePolygons but this no
>>>>> longer shows the original problem. Here I get a couple of steps further,
>>>>> but lack the proper JAI registration. Do you have an Idea to get the 
>>>>> sample
>>>>> to work?
>>>>>
>>>>> Full stacktrace is:
>>>>>
>>>>> Caused by: java.lang.NoClassDefFoundError: Could not initialize class
>>>>> javax.imageio.ImageIO
>>>>>
>>>>>                 at
>>>>> org.geotools.gce.arcgrid.ArcGridReader.checkSource(ArcGridReader.java:282)
>>>>>
>>>>>                 at
>>>>> org.geotools.gce.arcgrid.ArcGridReader.<init>(ArcGridReader.java:136)
>>>>>
>>>>>                 at
>>>>> org.geotools.gce.arcgrid.ArcGridReader.<init>(ArcGridReader.java:114)
>>>>>
>>>>> Best,
>>>>> Georg
>>>>>
>>>>> Andrea Aime <andrea.a...@geo-solutions.it> schrieb am Di., 31. Juli
>>>>> 2018 um 08:26 Uhr:
>>>>>
>>>>>> On Mon, Jul 30, 2018 at 8:35 PM Georg Heiler <
>>>>>> georg.kf.hei...@gmail.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I want to read a GridCoverage2D from an ESRi ArcGrid File using geo
>>>>>>> tools on centos using openjdk 8.
>>>>>>>
>>>>>>> But I get the error of
>>>>>>> NoClassDefFoundError Could not initialize class java.imageio.ImageIO
>>>>>>>
>>>>>>
>>>>>> "Could not initialize" normally means the class is there but its
>>>>>> static initialization failed (would be a "class not found" error 
>>>>>> otherwise,
>>>>>> no?).
>>>>>> Please share the full stack trace
>>>>>>
>>>>>> Cheers
>>>>>> Andrea
>>>>>>
>>>>>> ==
>>>>>>
>>>>>> GeoServer Professional Services from the experts! Visit
>>>>>> http://goo.gl/it488V for more information. == Ing. Andrea Aime
>>>>>> @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3
>>>>>> <https://maps.google.com/?q=Via+di+Montramito+3&entry=gmail&source=g>/A
>>>>>> 55054 Massarosa (LU) phone: +39 0584 962313 <+39%200584%20962313>
>>>>>> fax: +39 0584 1660272 <+39%200584%20166%200272> mob: +39 339 8844549
>>>>>> <+39%20339%20884%204549> http://www.geo-solutions.it
>>>>>> http://twitter.com/geosolutions_it
>>>>>> ------------------------------------------------------- *Con
>>>>>> riferimento alla normativa sul trattamento dei dati personali (Reg. UE
>>>>>> 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
>>>>>> precisa che ogni circostanza inerente alla presente email (il suo
>>>>>> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
>>>>>> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
>>>>>> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
>>>>>> operazione è illecita. Le sarei comunque grato se potesse darmene 
>>>>>> notizia.
>>>>>> This email is intended only for the person or entity to which it is
>>>>>> addressed and may contain information that is privileged, confidential or
>>>>>> otherwise protected from disclosure. We remind that - as provided by
>>>>>> European Regulation 2016/679 “GDPR” - copying, dissemination or use of 
>>>>>> this
>>>>>> e-mail or the information herein by anyone other than the intended
>>>>>> recipient is prohibited. If you have received this email by mistake, 
>>>>>> please
>>>>>> notify us immediately by telephone or e-mail.*
>>>>>>
>>>>>
>>>>
>>>> --
>>>>
>>>> Regards, Andrea Aime == GeoServer Professional Services from the
>>>> experts! Visit http://goo.gl/it488V for more information. == Ing.
>>>> Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di
>>>> Montramito 3/A 55054 Massarosa
>>>> <https://maps.google.com/?q=Via+di+Montramito+3/A%0D%0A55054++Massarosa&entry=gmail&source=g>
>>>> (LU) phone: +39 0584 962313 <+39%200584%20962313> fax: +39 0584 1660272
>>>> <+39%200584%20166%200272> mob: +39 339 8844549 <+39%20339%20884%204549>
>>>> http://www.geo-solutions.it http://twitter.com/geosolutions_it
>>>> ------------------------------------------------------- *Con
>>>> riferimento alla normativa sul trattamento dei dati personali (Reg. UE
>>>> 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
>>>> precisa che ogni circostanza inerente alla presente email (il suo
>>>> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
>>>> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
>>>> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
>>>> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>>>> This email is intended only for the person or entity to which it is
>>>> addressed and may contain information that is privileged, confidential or
>>>> otherwise protected from disclosure. We remind that - as provided by
>>>> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
>>>> e-mail or the information herein by anyone other than the intended
>>>> recipient is prohibited. If you have received this email by mistake, please
>>>> notify us immediately by telephone or e-mail.*
>>>>
>>>
>
> --
>
> Regards, Andrea Aime == GeoServer Professional Services from the experts!
> Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime
> @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054
> Massarosa
> <https://maps.google.com/?q=Via+di+Montramito+3/A%0D%0A55054++Massarosa&entry=gmail&source=g>
> (LU) phone: +39 0584 962313 <+39%200584%20962313> fax: +39 0584 1660272
> <+39%200584%20166%200272> mob: +39 339 8844549 <+39%20339%20884%204549>
> http://www.geo-solutions.it http://twitter.com/geosolutions_it
> ------------------------------------------------------- *Con riferimento
> alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 -
> Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni
> circostanza inerente alla presente email (il suo contenuto, gli eventuali
> allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i
> destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per
> errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le
> sarei comunque grato se potesse darmene notizia. This email is intended
> only for the person or entity to which it is addressed and may contain
> information that is privileged, confidential or otherwise protected from
> disclosure. We remind that - as provided by European Regulation 2016/679
> “GDPR” - copying, dissemination or use of this e-mail or the information
> herein by anyone other than the intended recipient is prohibited. If you
> have received this email by mistake, please notify us immediately by
> telephone or e-mail.*
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to