You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by John Bourke <jo...@Cedar.com> on 2002/05/01 16:20:05 UTC

Trying to resolve memory exception through correct use of page se quencing

Hi,
I'm having a problem rendering a large file (500 plus pages) using FOP. Fop
eventually causes my machine to run out of memory even though I'm allocating
it 300mb.
I think the problem is caused by me having a page sequence called detail
page, into which my 500 pages worth of data is placed with a page break
before each page full. BUT, this is all within the one page sequence which I
think FOP is trying to render all at once.
Ideally for each page full I would like to start a new page sequence and
thus allow FOP only render one page at a time. Does this sound to anybody
like the right way to go about this?

My page sequence master is as follows:
<fo:page-sequence-master master-name="reportDetails">
    <fo:repeatable-page-master-reference master-name="detailPage"/>
</fo:page-sequence-master>

I then start my page using:
<fo:page-sequence master-reference="reportDetails" initial-page-number="2">

Then when rendering FOP throws the following exception:
---------
java.lang.NullPointerException
at
org.apache.fop.fo.pagination.PageSequence.getNextPageMaster(PageSequence.jav
a:526)
at org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:334)
at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:268)
at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:200)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:182)
at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator
.java:1550)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1204)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at org.apache.fop.apps.Driver.render(Driver.java:481)
at org.apache.fop.apps.Driver.run(Driver.java:554)


Apologies for the length of this message but can anybody advise me?

Best Regards,

John Bourke


***********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. Any unauthorised distribution or copying is strictly 
prohibited.

Whilst Cedar Plc takes steps to prevent the transmission of 
viruses via e-mail, we can not guarantee that any email or 
attachment is free from computer viruses and you are strongly
advised to undertake your own anti-virus precautions.

Cedar Plc grants no warranties regarding performance,
use or quality of any e-mail or attachment and undertakes no 
liability for loss or damage, howsoever caused.
************************************************************************

Re: Trying to resolve memory exception through correct use of page se quencing

Posted by "Peter B. West" <pb...@powerup.com.au>.
John,

Yes, minimising page-sequence length will reduce memory consumption.

Peter

John Bourke wrote:

>Ideally for each page full I would like to start a new page sequence and
>thus allow FOP only render one page at a time. Does this sound to anybody
>like the right way to go about this?
>
>  
>



Re: Trying to resolve memory exception through correct use of page se quencing

Posted by "J.Pietschmann" <j3...@yahoo.de>.
John Bourke wrote:
> I think the problem is caused by me having a page sequence called detail
> page, into which my 500 pages worth of data is placed with a page break
> before each page full. BUT, this is all within the one page sequence which I
> think FOP is trying to render all at once.

FOP tries to render page by page, however, ending a
page sequence will usually free additional memory
(perhaps a lot of additional memory, according to
the stories on the list).

> Then when rendering FOP throws the following exception:
> ---------
> java.lang.NullPointerException
> at
> org.apache.fop.fo.pagination.PageSequence.getNextPageMaster(PageSequence.jav
> a:526)

This has nothing to do with a memory problem. You
probably have referenced a page master which doesn't
exist, or hit another FOP bug. Can you post your
layout-master-set?


J.Pietschmann