jump to navigation

JAI October 19, 2009

Posted by Phill in General J2EE.
Tags: ,
comments closed

Recently I had a project where I needed to use Java Advanced Imaging (JAI) to convert TIFF files into JPG. (Unfortunately Java doesn’t provide a TIFF decoder out of the box).

I had an issue today whereby I needed to deploy the application on a server (it’s a web app). I kept coming up with errors about JAI not being able to find the TIFF decoder:

     at javax.imageio.spi.FilterIterator.next(Unknown Source)

For anyone who is Googling it!

Anyway, it turns out that I had got jai_core.jar and jai_codec.jar in my WEB-INF/lib folder (these are both part of the standard JAI Distribution), but for some reason I also needed jai_imageio.jar (which is part of the JAI-ImageIO package).

I can’t quite fathom why you need so many JAR files, but it seems to work now, so there you go. Hope this helps someone else out!