我正在尝试处理一个geotif与geotools作为一个风暴拓扑螺栓的一部分。代码在本地模式下在我的本地机器上运行良好,但是当我通过一个着色jar部署到集群时,我在storm日志中收到这个异常。geotools似乎没有抛出异常,发生在org.geotools.gce.geotiff.geotifreader第197行,但根本原因似乎是内部库类javax.imageio.spi.iioserviceprovider,其中表示vendorname==null!正如你在下面的堆栈中看到的。如果有人有任何线索,请告诉我,我已经修补这几天了。
这里有一些关于我的构建和平台的信息
geotools 11.1
java 7
POM is below
running on windows 7 when in local mode (works perfectly here)
this problem happens on Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-63-virtual x86_64)
java.util.ServiceConfigurationError: javax.imageio.spi.ImageReaderSpi: Provider com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageReaderSpi could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:224) ~[na:1.7.0_71]
at java.util.ServiceLoader.access$100(ServiceLoader.java:181) ~[na:1.7.0_71]
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:377) ~[na:1.7.0_71]
at java.util.ServiceLoader$1.next(ServiceLoader.java:445) ~[na:1.7.0_71]
at javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(IIORegistry.java:210) ~[na:1.7.0_71]
at javax.imageio.spi.IIORegistry.<init>(IIORegistry.java:138) ~[na:1.7.0_71]
at javax.imageio.spi.IIORegistry.getDefaultInstance(IIORegistry.java:159) ~[na:1.7.0_71]
at org.geotools.image.io.ImageIOExt.getImageInputStreamSPI(ImageIOExt.java:221) ~[stormjar.jar:na]
at org.geotools.image.io.ImageIOExt.getImageInputStreamSPI(ImageIOExt.java:204) ~[stormjar.jar:na]
at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:197) ~[stormjar.jar:na]
at org.geotools.gce.geotiff.GeoTiffReader.<init>(GeoTiffReader.java:156) ~[stormjar.jar:na]
at dgi.eii.utils.PixelExtractor.extract(PixelExtractor.java:80) ~[stormjar.jar:na]
at dgi.eii.storm.bolts.RasterPixelExtractorBolt.execute(RasterPixelExtractorBolt.java:59) ~[stormjar.jar:na]
at backtype.storm.daemon.executor$fn__5641$tuple_action_fn__5643.invoke(executor.clj:631) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
at backtype.storm.daemon.executor$mk_task_receiver$fn__5564.invoke(executor.clj:399) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
at backtype.storm.disruptor$clojure_handler$reify__745.onEvent(disruptor.clj:58) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
at backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:125) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
at backtype.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:99) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
at backtype.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:80) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
at backtype.storm.daemon.executor$fn__5641$fn__5653$fn__5700.invoke(executor.clj:746) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
at backtype.storm.util$async_loop$fn__457.invoke(util.clj:431) ~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
at clojure.lang.AFn.run(AFn.java:24) [clojure-1.5.1.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
Caused by: java.lang.IllegalArgumentException: vendorName == null!
at javax.imageio.spi.IIOServiceProvider.<init>(IIOServiceProvider.java:76) ~[na:1.7.0_71]
at javax.imageio.spi.ImageReaderWriterSpi.<init>(ImageReaderWriterSpi.java:231) ~[na:1.7.0_71]
at javax.imageio.spi.ImageReaderSpi.<init>(ImageReaderSpi.java:212) ~[na:1.7.0_71]
at com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageReaderSpi.<init>(CLibJPEGImageReaderSpi.java:80) ~[stormjar.jar:na]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_71]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[na:1.7.0_71]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.7.0_71]
at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[na:1.7.0_71]
at java.lang.Class.newInstance(Class.java:379) ~[na:1.7.0_71]
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373) ~[na:1.7.0_71]
... 20 common frames omitted
geotools的pom条目
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-swing</artifactId>
<version>11.1</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-epsg-hsql</artifactId>
<version>11.1</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-geotiff</artifactId>
<version>11.1</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-image</artifactId>
<version>11.1</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-wms</artifactId>
<version>11.1</version>
</dependency>
暂无答案!
目前还没有任何答案,快来回答吧!