Are you actually giving FOP a little memory to play with? I mean a little more than the 64MB allocated by default? FOP is still a bit memory-intensive, but 100 pages (per page-sequence) should easily be handled with less than 512MB. If you can, post a link to an FO file. That would allow us to do some profiling to see why this happens (if my very obvious tip above doesn't apply).
On 12.08.2008 21:53:25 DavidJKelly wrote: > > Andreas, > > Most of the book was in fact in a single page sequence. I attempted the > three fixes you suggested, but with no luck. The FO is now in page sequences > less than 100 pages each, and all fo:inlines are now fo:wrappers. I have > also removed all keep-together and keep-with attributes. > > At risk of repetition, here is the error I get: > > WARNING: Line 2 of a paragraph overflows the available area by 400mpt. > (fo:block > , location: 46211/114) > Exception in thread "main" java.lang.OutOfMemoryError: Java heap space > at > org.apache.fop.layoutmgr.inline.TextLayoutManager.createTextArea(Text > LayoutManager.java:408) > at > org.apache.fop.layoutmgr.inline.TextLayoutManager.addAreas(TextLayout > Manager.java:361) > at > org.apache.fop.layoutmgr.inline.LineLayoutManager.addInlineArea(LineL > ayoutManager.java:1716) > at > org.apache.fop.layoutmgr.inline.LineLayoutManager.addAreas(LineLayout > Manager.java:1568) > at > org.apache.fop.layoutmgr.BlockLayoutManager.addAreas(BlockLayoutManag > er.java:395) > at > org.apache.fop.layoutmgr.BlockLayoutManager.addAreas(BlockLayoutManag > er.java:395) > at > org.apache.fop.layoutmgr.BlockLayoutManager.addAreas(BlockLayoutManag > er.java:395) > at > org.apache.fop.layoutmgr.BlockLayoutManager.addAreas(BlockLayoutManag > er.java:395) > at > org.apache.fop.layoutmgr.AreaAdditionUtil.addAreas(AreaAdditionUtil.j > ava:121) > at > org.apache.fop.layoutmgr.FlowLayoutManager.addAreas(FlowLayoutManager > .java:305) > at > org.apache.fop.layoutmgr.PageBreaker.addAreas(PageBreaker.java:241) > at > org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.jav > a:508) > at > org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.jav > a:371) > at > org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:262) > at > org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.jav > a:346) > at > org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.jav > a:264) > at > org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(Pag > eSequenceLayoutManager.java:106) > at > org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.j > ava:234) > at > org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java > :123) > at > org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilde > r.java:340) > at > org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:169) > at > org.apache.xalan.transformer.TransformerIdentityImpl.endElement(Trans > formerIdentityImpl.java:1101) > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown > Source > ) > at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown > Source) > > at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow > n Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent > Dispatcher.dispatch(Unknown Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un > known Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) > at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown > Sour > ce) > > Many thanks for the quickness of your previous reply. Any further help you > might be able to offer would be appreciated. > > Regards, > David Kelly > > > > Andreas Delmelle-2 wrote: > > > > On Aug 11, 2008, at 18:43, DavidJKelly wrote: > > > > Hi > > > >> I have been trying to troubleshoot a java heap error for a good > >> while, and I > >> have researched the error messages on this site without luck. I > >> have a > >> 6000+ page document with numerous tables - the largest tables being > >> at the > >> front of the document, where they run fine. In dividing the > >> document, I > >> find that it gets to slightly over 3000 pages before it dies. > >> Because the > >> tables are simple two-column tables, I tried setting them up as > >> lists in > >> list-blocks, but I still get a similar error. Following are the > >> errors from > >> both the table and list versions: > > > > It depends on how large the individual page-sequences are. If you > > cram all 6000 pages into one page-sequence, and do not use forced > > breaks anywhere, you're going to need what looks like an unreasonable > > amount of heap to render the document (because the current > > implementation of the layout algorithm does not consider any page- > > break final, unless in case of a forced break, or the end of the page- > > sequence). > > > > If possible, try to break up the document into multiple page- > > sequences, and the issue should disappear. > > > > Other hint: if the document contains a lot of fo:inlines, try simply > > replacing those with fo:wrapper. > > > > > > Cheers > > > > Andreas > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/Java-heap-overflow-error---unknown-reason-tp18929472p18951490.html > Sent from the FOP - Users mailing list archive at Nabble.com. > Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
