Geotiff reader fails to read valid geotiff inside a Netbeans application

Description

I get the following stack trace when trying to read a geotiff file.

When I look at org.geotools.coverage.grid.io.imageio.MaskOverviewProvider in the method Spihelper(...) on line 720 it is passing in the name of the geotiff file as a URL for arg1 of the call.
However the com.sun.imageio.spi.InputStreamImageInputStreamSpi method createInputStreamInstance(...) accepts an Object for arg1 but if the object isn't an InputStream it will ALWAYS throw and IllegalArgumentException. No URLs, Files or Filenames allowed...

I think this may be a problem with earlier versions also but I'm not sure.
I've used the Geotiff reader in another project and it works there so maybe there is something happening with jar loading order or something. I am not sure. However one thing is for sure

Environment

Windows 7
Netbeans 8.1
Java 8

Assignee

Andrea Aime

Reporter

Brian McCormick

Triage

Components

Affects versions

Priority

Highest
Configure