As Joerg suggested earlier, this seems to be a class loader problem. We
already check for both conditions a) and b). I've just checked and FOP
falls back nicely to ImageIO if support for JAI is compiled but JAI is
not present during runtime. In my case, loading JAIImage resulted in a
ClassNotFoundError (for javax/media/jai/PlanarImage) during class
loading which ImageFactory catches nicely. In Raino's case this does not
seem to work. Maybe we need to add explicit checks for the presence of a
particular library to work around any strange effects by certain class
loader setups. First step, however, is to reproduce the problem which I
haven't managed. I guess Raino will need to tell us exactly what web
container he uses.

On 29.05.2006 15:02:38 Manuel Mall wrote:
> On Monday 29 May 2006 20:33, Jeremias Maerki wrote:
> > The reason is org.apache.fop.images.FopFactory which specifies JAI as
> > the first image provider to try for loading GIF images. The code
> > should actually be smart enough to fall back to the next provider if
> > it can't load the image with the first. I will need to investigate
> > why this happens.
> >
> > On 29.05.2006 11:46:09 Raino Kolk wrote:
> > > I use fop 0.92 and i try to use it in Spring framework.
> > > The exact error is:
> > > java.lang.NoClassDefFoundError:
> > > com/sun/media/jai/codec/FileCacheSeekableStream at
> > > org.apache.fop.image.JAIImage.loadImage(JAIImage.java:80) ...
> > >
> > > It seems that in some reason fop trys to use JAI if i use gif
> > > pictures. So the question is why?
> 
> FOP only checks if the class org.apache.fop.image.JAIImage can be loaded 
> (classForName method). It was assumed that this will fail if JAI is not 
> available in the classpath. May be that is not always true especially 
> for a FOP binary distribution and we may have to check both:
> a) FOP was build with JAI support 
> AND 
> b) JAI is available at runtime?
> 
> Same for Jimi and ImageIO?


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to