question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Raster input plugin throws error if JAI/ImageIO not installed

See original GitHub issue

Initially reported on gitter linked to gist here: https://gist.github.com/kitplummer/b574edab3ac3f3c4ba57

[bennight@cacti data]$ geowave-ingest --localingest -b /data/natural_earth/ -i $INSTANCE -n geowave -p $GEOWAVE_PASS -u $GEOWAVE_USER -z $ZOOKEEPERS
Apr 11, 2015 4:54:49 PM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'GeoServerResourceLoader', but ApplicationContext is unset.
Apr 11, 2015 4:54:49 PM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'GeoServerResourceLoader', but ApplicationContext is unset.
Apr 11, 2015 4:54:49 PM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'GeoServerResourceLoader', but ApplicationContext is unset.
Apr 11, 2015 4:54:49 PM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'GeoServerResourceLoader', but ApplicationContext is unset.
Apr 11, 2015 4:54:50 PM org.geotools.factory.FactoryRegistry scanForPlugins
WARNING: Can't load a service for category "GridFormatFactorySpi". Cause is "ServiceConfigurationError: org.geotools.coverage.grid.io.GridFormatFactorySpi: Provider org.geotools.gce.imagemosaic.ImageMosaicFormatFactory could not be instantiated".
java.util.ServiceConfigurationError: org.geotools.coverage.grid.io.GridFormatFactorySpi: Provider org.geotools.gce.imagemosaic.ImageMosaicFormatFactory could not be instantiated
        at java.util.ServiceLoader.fail(ServiceLoader.java:232)
        at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
        at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
        at org.geotools.factory.FactoryRegistry.register(FactoryRegistry.java:826)
        at org.geotools.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:772)
        at org.geotools.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:750)
        at org.geotools.coverage.grid.io.GridFormatFinder.scanForPlugins(GridFormatFinder.java:122)
        at org.geotools.coverage.grid.io.GridFormatFinder.getAvailableFormats(GridFormatFinder.java:85)
        at org.geotools.coverage.grid.io.GridFormatFinder.findFormats(GridFormatFinder.java:178)
        at org.geotools.coverage.grid.io.GridFormatFinder.findFormat(GridFormatFinder.java:241)
        at org.geotools.coverage.grid.io.GridFormatFinder.findFormat(GridFormatFinder.java:216)
        at mil.nga.giat.geowave.types.geotools.raster.GeoToolsRasterDataStoreIngestPlugin.supportsFile(GeoToolsRasterDataStoreIngestPlugin.java:61)
        at mil.nga.giat.geowave.ingest.local.LocalPluginFileVisitor$PluginVisitor.supportsFile(LocalPluginFileVisitor.java:74)
        at mil.nga.giat.geowave.ingest.local.LocalPluginFileVisitor.visitFile(LocalPluginFileVisitor.java:125)
        at mil.nga.giat.geowave.ingest.local.LocalPluginFileVisitor.visitFile(LocalPluginFileVisitor.java:30)
        at java.nio.file.Files.walkFileTree(Files.java:2670)
        at java.nio.file.Files.walkFileTree(Files.java:2742)
        at mil.nga.giat.geowave.ingest.local.AbstractLocalFileDriver.processInput(AbstractLocalFileDriver.java:60)
        at mil.nga.giat.geowave.ingest.local.LocalFileIngestDriver.runInternal(LocalFileIngestDriver.java:114)
        at mil.nga.giat.geowave.ingest.AbstractCommandLineDriver.run(AbstractCommandLineDriver.java:72)
        at mil.nga.giat.geowave.ingest.IngestMain.main(IngestMain.java:51)
Caused by: java.util.ServiceConfigurationError: javax.imageio.spi.ImageInputStreamSpi: Provider com.sun.media.imageioimpl.stream.ChannelImageInputStreamSpi could not be instantiated
        at java.util.ServiceLoader.fail(ServiceLoader.java:232)
        at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
        at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
        at javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:210)
        at javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:138)
        at javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:159)
        at it.geosolutions.imageio.utilities.ImageIOUtilities.replaceProvider(ImageIOUtilities.java:452)
        at org.geotools.gce.imagemosaic.ImageMosaicFormatFactory.replaceTIFF(ImageMosaicFormatFactory.java:343)
        at org.geotools.gce.imagemosaic.ImageMosaicFormatFactory.<clinit>(ImageMosaicFormatFactory.java:61)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at java.lang.Class.newInstance(Class.java:442)
        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
        ... 20 more
Caused by: java.lang.IllegalArgumentException: vendorName == null!
        at javax.imageio.spi.IIOServiceProvider.<init>(IIOServiceProvider.java:76)
        at javax.imageio.spi.ImageInputStreamSpi.<init>(ImageInputStreamSpi.java:90)
        at com.sun.media.imageioimpl.stream.ChannelImageInputStreamSpi.<init>(ChannelImageInputStreamSpi.java:63)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at java.lang.Class.newInstance(Class.java:442)
        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
        ... 34 more

Apr 11, 2015 4:54:50 PM org.geotools.factory.FactoryRegistry scanForPlugins
WARNING: Can't load a service for category "GridFormatFactorySpi". Cause is "ServiceConfigurationError: org.geotools.coverage.grid.io.GridFormatFactorySpi: Provider org.geotools.gce.imagemosaic.ImageMosaicFormatFactory could not be instantiated".
java.util.ServiceConfigurationError: org.geotools.coverage.grid.io.GridFormatFactorySpi: Provider org.geotools.gce.imagemosaic.ImageMosaicFormatFactory could not be instantiated
        at java.util.ServiceLoader.fail(ServiceLoader.java:232)
        at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
        at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
        at org.geotools.factory.FactoryRegistry.register(FactoryRegistry.java:826)
        at org.geotools.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:772)
        at org.geotools.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:750)
        at org.geotools.coverage.grid.io.GridFormatFinder.scanForPlugins(GridFormatFinder.java:122)
        at org.geotools.coverage.grid.io.GridFormatFinder.getAvailableFormats(GridFormatFinder.java:85)
        at org.geotools.coverage.grid.io.GridFormatFinder.findFormats(GridFormatFinder.java:178)
        at org.geotools.coverage.grid.io.GridFormatFinder.findFormat(GridFormatFinder.java:241)
        at org.geotools.coverage.grid.io.GridFormatFinder.findFormat(GridFormatFinder.java:216)
        at mil.nga.giat.geowave.types.geotools.raster.GeoToolsRasterDataStoreIngestPlugin.toGeoWaveData(GeoToolsRasterDataStoreIngestPlugin.java:74)
        at mil.nga.giat.geowave.types.geotools.raster.GeoToolsRasterDataStoreIngestPlugin.toGeoWaveData(GeoToolsRasterDataStoreIngestPlugin.java:35)
        at mil.nga.giat.geowave.ingest.local.LocalFileIngestDriver.processFile(LocalFileIngestDriver.java:146)
        at mil.nga.giat.geowave.ingest.local.LocalFileIngestDriver.processFile(LocalFileIngestDriver.java:33)
        at mil.nga.giat.geowave.ingest.local.LocalPluginFileVisitor.visitFile(LocalPluginFileVisitor.java:126)
        at mil.nga.giat.geowave.ingest.local.LocalPluginFileVisitor.visitFile(LocalPluginFileVisitor.java:30)
        at java.nio.file.Files.walkFileTree(Files.java:2670)
        at java.nio.file.Files.walkFileTree(Files.java:2742)
        at mil.nga.giat.geowave.ingest.local.AbstractLocalFileDriver.processInput(AbstractLocalFileDriver.java:60)
        at mil.nga.giat.geowave.ingest.local.LocalFileIngestDriver.runInternal(LocalFileIngestDriver.java:114)
        at mil.nga.giat.geowave.ingest.AbstractCommandLineDriver.run(AbstractCommandLineDriver.java:72)
        at mil.nga.giat.geowave.ingest.IngestMain.main(IngestMain.java:51)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.geotools.gce.imagemosaic.ImageMosaicFormatFactory
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at java.lang.Class.newInstance(Class.java:442)
        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
        ... 22 more

Exception in thread "main" java.lang.UnsupportedOperationException: Trying to get a reader from an unknown format.
        at org.geotools.coverage.grid.io.UnknownFormat.getReader(UnknownFormat.java:62)
        at mil.nga.giat.geowave.types.geotools.raster.GeoToolsRasterDataStoreIngestPlugin.toGeoWaveData(GeoToolsRasterDataStoreIngestPlugin.java:75)
        at mil.nga.giat.geowave.types.geotools.raster.GeoToolsRasterDataStoreIngestPlugin.toGeoWaveData(GeoToolsRasterDataStoreIngestPlugin.java:35)
        at mil.nga.giat.geowave.ingest.local.LocalFileIngestDriver.processFile(LocalFileIngestDriver.java:146)
        at mil.nga.giat.geowave.ingest.local.LocalFileIngestDriver.processFile(LocalFileIngestDriver.java:33)
        at mil.nga.giat.geowave.ingest.local.LocalPluginFileVisitor.visitFile(LocalPluginFileVisitor.java:126)
        at mil.nga.giat.geowave.ingest.local.LocalPluginFileVisitor.visitFile(LocalPluginFileVisitor.java:30)
        at java.nio.file.Files.walkFileTree(Files.java:2670)
        at java.nio.file.Files.walkFileTree(Files.java:2742)
        at mil.nga.giat.geowave.ingest.local.AbstractLocalFileDriver.processInput(AbstractLocalFileDriver.java:60)
        at mil.nga.giat.geowave.ingest.local.LocalFileIngestDriver.runInternal(LocalFileIngestDriver.java:114)
        at mil.nga.giat.geowave.ingest.AbstractCommandLineDriver.run(AbstractCommandLineDriver.java:72)
        at mil.nga.giat.geowave.ingest.IngestMain.main(IngestMain.java:51)
[bennight@cacti data]$

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rfechercommented, Mar 29, 2016

this is related to #333

1reaction
rfechercommented, Mar 29, 2016

to clarify the raster format plugin requires JAI and cannot be used if JAI is not installed. However, we should be able to support vector ingest or any other format even if the raster format cannot be used and that is the spirit of this ticket.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Raster input plugin throws error if JAI/ImageIO not installed
Raster input plugin throws error if JAI/ImageIO not installed. ... ImageMosaicFormatFactory could not be instantiated at java.util.
Read more >
SCP Plugin for QGIS 3.16.7 Error 'raster is not loaded'
This is more of a FYI than a question... I'm running SCP (semi automatic classification) 7.10.4 plugin to QGIS 3.16.7 under Windows.
Read more >
Java ImageIO IIOException: Unsupported image type?
I have checked and re-checked that it is in fact this line throwing the exception, that the File object is valid, that the...
Read more >
CHANGELOG - GitHub Pages
#808; Raster input plugin throws error if JAI/ImageIO not installed #332; Better handling of case where EPSG:4326 reprojection can't happen #309 ...
Read more >
LuciadFusion Release notes - Luciad Developer Platform
TLcdEPSGReferenceParser would throw an exception when the lcd_geoid_resources.jar file ... If no reference information can be found next to the input data, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found