From: "Al-Dhahir, Haitham" <[EMAIL PROTECTED]>

<snip/>

What I have found is that my document generates successfully if I only
create it once; however, what I was originally trying to do was find out the
total number of pages across all page sequences, therefore I was creating
the document twice and taking the page count from the driver after the first
pass. When I use this "two pass" technique, I find that I get an
OutOfMemoryError. I tried increasing my JVM memory to 256MB, which is the
size of the RAM on my machine, but still get the same problem.



You can insert the total page count into your document using <fo:page-number-citation>, so you shouldnt need to do two passes, just for that.


I have read the posts about tables taking up a lot of memory; but can anyone
explain why it works fine with one pass but fails with two passes? Is the
original document being held in memory while the new one is being created?
If so, is this necessary and is there anything I can do in my code to
prevent this? My code is as follows:



The memory occupied by the original document should be GC'd. There is probably a memory leak somewhere, possibly in your code or in FOP. Try to isolate problem using JProbe or other Java Profiling software.


Sorry I cant offer a better suggestion,

Chris

_________________________________________________________________
Sign-up for a FREE BT Broadband connection today! http://www.msn.co.uk/specials/btbroadband



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



Reply via email to