Took 2 months to track this down, in my spare time. Test Environment: Weblogic 5.1 servlet, Using LoadRunner running 10 concurrent users generating the same 17 page pdf over and over with no think time. Pdf has a common small gif logo on each page, 5 pages include a common complex chart. Problem: An occasional NullPointerException was being thrown from the PDFXObject.output () method. Root Cause: The design of the system did not consider concurrent PDFDocuments accessing the same FopImage. The FopImage member of the PDFXObject opens and closes an input stream from the image url, as well as nulling out other elements. Access to the FopImage member (a GifImage) was unsynchronized. The line that always threw the execption was int bitMapsSize = fopimage.getBitmapsSize(); Solution: In the PDFXObject.output() method, added the following line at the beginning of the method body. synchronized(fopimage) { The NullPointerExceptions disappeared! Please no applause, just send money or thanks to mb32@ntrs.com
Which fop version are you talking about? Anyway, thread-safe problems fixed already in cvs. Try cvs version (or just wait few days till 0.20.5 is out) and if it doesn't help, feel free to reopen the bug.
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed