title: javax.imageio.spi.IIOServiceProvider throwing Exception using GeoTools when reading Geotiff inside Storm
body: <p>I am trying to process a Geotif with GeoTools as part of a bolt in a Storm topology. The code runs fine on my local machine in local mode, but when I deploy to the cluster -via a shaded jar- I receive this excepion in the Storm logs. It appears that Geotools is not throwing the exception, happens here org.geotools.gce.geotiff.GeoTiffReader line 197, but it seems the root cause is the internal library class javax.imageio.spi.IIOServiceProvider where it says vendorName == null! as you can see below in the stack. If anyone has any clue please let me know, I have tinkered with this for days now.</p>
  
  <p>Here is some info regarding my  build and platform</p>
  
  <pre><code>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.&lt;init&gt;(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.&lt;init&gt;(GeoTiffReader.java:197) ~[stormjar.jar:na]
          at org.geotools.gce.geotiff.GeoTiffReader.&lt;init&gt;(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.&lt;init&gt;(IIOServiceProvider.java:76) ~[na:1.7.0_71]
          at javax.imageio.spi.ImageReaderWriterSpi.&lt;init&gt;(ImageReaderWriterSpi.java:231) ~[na:1.7.0_71]
          at javax.imageio.spi.ImageReaderSpi.&lt;init&gt;(ImageReaderSpi.java:212) ~[na:1.7.0_71]
          at com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageReaderSpi.&lt;init&gt;(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
  </code></pre>
  
  <p>POM entries for Geotools</p>
  
  <pre><code>&lt;dependency&gt;
          &lt;groupId&gt;org.geotools&lt;/groupId&gt;
          &lt;artifactId&gt;gt-swing&lt;/artifactId&gt;
          &lt;version&gt;11.1&lt;/version&gt;        
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.geotools&lt;/groupId&gt;
          &lt;artifactId&gt;gt-epsg-hsql&lt;/artifactId&gt;
          &lt;version&gt;11.1&lt;/version&gt;     
  
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.geotools&lt;/groupId&gt;
          &lt;artifactId&gt;gt-geotiff&lt;/artifactId&gt;
          &lt;version&gt;11.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.geotools&lt;/groupId&gt;
          &lt;artifactId&gt;gt-image&lt;/artifactId&gt;
          &lt;version&gt;11.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.geotools&lt;/groupId&gt;
          &lt;artifactId&gt;gt-wms&lt;/artifactId&gt;
          &lt;version&gt;11.1&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>