Seems like we have two people almost at the same time having problems
with NPEs in loadImage() methods.

Ivaylo, it looks like you're not using the latest version of FOP, so I
haven't been able to find out what exactly caused the NPE. It's not that
it will necessarily work if you update!

I've looked at the code and I think it's this.m_bitmaps is null for some
reason that I haven't figured out, yet. It's the same in as in (David's problem).

I believe it's a threading problem. There's a method close() in
Factory that sets m_images to null. FopImageFactory caches bitmaps, so
my guess is that an image can get closed while the same object is
accessed from a different thread (method loadImage()).

I must confess that I don't have time to look at it at the moment. Any

As a work-around, you could try to block your servlet so only one thread
at a time can use FOP to process your jobs. Not nice, but you could be
forced to do that for the time being.

> I create PDFs in 10 parallel threads and every now and then I have this
> Exception.
> Can someone clarify for me what is the problem and how to fix it?
> I suspect it is related with parallel usage of same gif image.


> java.lang.NullPointerException
>       at
> org.apache.fop.image.GifJpegImage.loadImage(

Jeremias Märki


Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Tel. +41 41 317 2020 - Fax +41 41 317 2029

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

  • Exception Gabrovsky, Ivaylo
    • Jeremias Maerki

Reply via email to