Yep, this is the classical pitfall. According to the spec, reading an  
image from a stream is not required,it is ok to return a null value.

Different java vendors/versions have different behavior. I know this  
from the imagemosaic-jdbc module, SUN sdk reads fine, IBM SDK throws  
NPEs.

The correct way is to implement a fallback implementation using JAI,  
as I did in the module mentioned above.

Please open a JIRA issue describing this problem. Adding this code is  
easy and will avoid future headaches  for users (for you it is too  
late, sorry)



Quoting Jan Torben Heuer <[email protected]>:

> Simone Giannecchini wrote:
>
>> So, you are telling me that you get that error right away during a
>> simple read on the reader without params?
>> This is rather strange, we might probably want to chat a bit on IRC
>> tomorrow to spot the cause. K?
>
> Ok, the solution was not to use an InputStream as source Object for the
> GeoTiffReader. An Url or a File works fine.
>
> I suggest to put that at least into the javadoc. Looking at the source code
> of GeoTiffReader, there is code that handles explicitly InputStream so I
> thought it is supported. Another solution is to directly throw an
> IllegalArgumentException with an explanation.
>
> Cheers,
>
> Jan
> --
>> From address is valid until 01.06.2010
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



------------------------------------------------------------------------------

_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to