Skip to content

Instantly share code, notes, and snippets.

@wnina
Created March 3, 2016 16:58
Show Gist options
  • Save wnina/5f93187a37b75b0a144b to your computer and use it in GitHub Desktop.
Save wnina/5f93187a37b75b0a144b to your computer and use it in GitHub Desktop.
hduser@master:/opt/geowave-0.9.0/deploy/target$ java -cp geowave-deploy-0.9.0-tools.jar:geowave-format-raster-0.9.0.jar:geowave-deploy-0.9.0-accumulo-singlejar.jar mil.nga.giat.geowave.core.cli.GeoWaveMain -localingest -b ~/Desktop/Proyecto-Tunki/datastore/ -f geotools-raster -datastore accumulo -user root -password 1234 -instance wetland -gwNamespace nswetland -zookeeper localhost:2181
03 Mar 11:49:42 WARN [client.ClientConfiguration] - Found no client.conf in default paths. Using default client configuration values.
Error while parsing JAI registry file "file:/opt/geowave-0.9.0/deploy/target/geowave-deploy-0.9.0-accumulo-singlejar.jar!/META-INF/registryFile.jai" :
Error in registry file at line number #4
A descriptor is already registered against the name "VectorBinarize" under registry mode "rendered"
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'GeoServerResourceLoader', but ApplicationContext is unset.
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'GeoServerResourceLoader', but ApplicationContext is unset.
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'ExtensionFilter', but ApplicationContext is unset.
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'ExtensionProvider', but ApplicationContext is unset.
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'ExtensionFilter', but ApplicationContext is unset.
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'GeoServerResourceLoader', but ApplicationContext is unset.
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'GeoServerResourceLoader', but ApplicationContext is unset.
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'ExtensionFilter', but ApplicationContext is unset.
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'ExtensionProvider', but ApplicationContext is unset.
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'ExtensionFilter', but ApplicationContext is unset.
Mar 03, 2016 11:49:42 AM org.geotools.gce.imagemosaic.Utils loadMosaicProperties
INFO: properties file doesn't exist
Mar 03, 2016 11:49:42 AM org.geotools.gce.imagemosaic.Utils loadMosaicProperties
INFO: properties file doesn't exist
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'GeoServerResourceLoader', but ApplicationContext is unset.
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'GeoServerResourceLoader', but ApplicationContext is unset.
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'ExtensionFilter', but ApplicationContext is unset.
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'ExtensionProvider', but ApplicationContext is unset.
Mar 03, 2016 11:49:42 AM org.geoserver.platform.GeoServerExtensions checkContext
WARNING: Extension lookup 'ExtensionFilter', but ApplicationContext is unset.
Mar 03, 2016 11:49:43 AM org.geotools.image.ImageWorker <clinit>
INFO: Warp/affine reduction enabled: true
Mar 03, 2016 11:49:43 AM org.geotools.factory.FactoryRegistry scanForPlugins
WARNING: Can't load a service for category "Operation". Cause is "ServiceConfigurationError: org.opengis.coverage.processing.Operation: Provider org.geotools.coverage.processing.operation.ZonalStatistics could not be instantiated".
java.util.ServiceConfigurationError: org.opengis.coverage.processing.Operation: Provider org.geotools.coverage.processing.operation.ZonalStatistics could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:224)
at java.util.ServiceLoader.access$100(ServiceLoader.java:181)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377)
at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
at org.geotools.factory.FactoryRegistry.register(FactoryRegistry.java:826)
at org.geotools.factory.FactoryRegistry.scanForPlugins(FactoryRegistry.java:772)
at org.geotools.factory.FactoryRegistry.scanForPluginsIfNeeded(FactoryRegistry.java:805)
at org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:196)
at org.geotools.coverage.processing.CoverageProcessor.scanForPlugins(CoverageProcessor.java:641)
at org.geotools.coverage.processing.CoverageProcessor.getOperation(CoverageProcessor.java:518)
at org.geotools.coverage.processing.Operations.doOperation(Operations.java:880)
at org.geotools.coverage.processing.Operations.resample(Operations.java:486)
at mil.nga.giat.geowave.adapter.raster.adapter.RasterDataAdapter$MosaicPerPyramidLevelBuilder$1.next(RasterDataAdapter.java:676)
at mil.nga.giat.geowave.adapter.raster.adapter.RasterDataAdapter$MosaicPerPyramidLevelBuilder$1.next(RasterDataAdapter.java:548)
at mil.nga.giat.geowave.core.store.IteratorWrapper.next(IteratorWrapper.java:75)
at mil.nga.giat.geowave.datastore.accumulo.AccumuloIndexWriter.write(AccumuloIndexWriter.java:186)
at mil.nga.giat.geowave.datastore.accumulo.AccumuloIndexWriter.write(AccumuloIndexWriter.java:168)
at mil.nga.giat.geowave.core.ingest.IngestUtils.ingest(IngestUtils.java:101)
at mil.nga.giat.geowave.core.ingest.local.LocalFileIngestDriver.processFile(LocalFileIngestDriver.java:129)
at mil.nga.giat.geowave.core.ingest.local.LocalFileIngestDriver.processFile(LocalFileIngestDriver.java:28)
at mil.nga.giat.geowave.core.ingest.local.LocalPluginFileVisitor.visitFile(LocalPluginFileVisitor.java:126)
at mil.nga.giat.geowave.core.ingest.local.LocalPluginFileVisitor.visitFile(LocalPluginFileVisitor.java:30)
at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:135)
at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:199)
at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:69)
at java.nio.file.Files.walkFileTree(Files.java:2602)
at java.nio.file.Files.walkFileTree(Files.java:2635)
at mil.nga.giat.geowave.core.ingest.local.AbstractLocalFileDriver.processInput(AbstractLocalFileDriver.java:60)
at mil.nga.giat.geowave.core.ingest.local.LocalFileIngestDriver.runInternal(LocalFileIngestDriver.java:109)
at mil.nga.giat.geowave.core.ingest.AbstractIngestCommandLineDriver.runOperation(AbstractIngestCommandLineDriver.java:68)
at mil.nga.giat.geowave.core.cli.GeoWaveMain.run(GeoWaveMain.java:56)
at mil.nga.giat.geowave.core.cli.GeoWaveMain.main(GeoWaveMain.java:23)
Caused by: org.opengis.coverage.processing.OperationNotFoundException: No such "Zonal" operation for this processor.
at org.geotools.coverage.processing.OperationJAI.getOperationDescriptor(OperationJAI.java:213)
at org.geotools.coverage.processing.operation.ZonalStatistics.<init>(ZonalStatistics.java:87)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:383)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373)
... 29 more
@wnina
Copy link
Author

wnina commented Mar 4, 2016

the solution was modify the file pom.xml from root the project for that maven shade plugin configuration that specifies that JAI registration files be merged during shaded jar creation.

<transformers>
    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
        <manifestEntries>
            <Main-Class>mil.nga.giat.geowave.core.cli.GeoWaveMain</Main-Class>
        </manifestEntries>
    </transformer>
    <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>

    <!-- add lines -->  
    <!-- merges META-INF/javax.media.jai.registryFile.jai entries instead of overwriting -->
    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
        <resource>META-INF/javax.media.jai.registryFile.jai</resource>
    </transformer>
    <!-- merges META-INF/registryFile.jai entries instead of overwriting -->
    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
        <resource>META-INF/registryFile.jai</resource>
    </transformer>
    <!-- merges META-INF/registryFile.jaiext entries instead of overwriting -->
    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
        <resource>META-INF/registryFile.jaiext</resource>  plugin configuration that specifies that JAI registration files be merged during shaded jar creation
    </transformer>
    <!-- end-add lines -->  
</transformers>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment