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 "Steffanina, Jeff" <Je...@marriott.com> on 2009/01/21 21:53:50 UTC

Out of Memory Error from Java

I have:
	FOP 0.95
	Linux
            Java 1.5
My Java starts with memory set as:	-Xmx192m

I can print an unlimited number of individual invoices in a single Java
process (i.e. the user chooses the option to print).  For example, print
2,000 invoices where each  invoice contains 100 lines of details.
Therefore, print a total of 200,000 lines of detail.

However, I receive an "Out of Memory" error from Java when I attempt to
print a single invoice  that contains more than 4,500 lines of detail.

Other than continuing to increase the amount of memory at startup, is
there something I can do to prevent the error when printing a single,
large invoice?  


Jeff 

Re: Out of Memory Error from Java

Posted by Chris Bowditch <bo...@hotmail.com>.
Steffanina, Jeff wrote:

> I have:
>         FOP 0.95
>         Linux
>             Java 1.5
> My Java starts with memory set as:      -Xmx192m
> 
> I can print an unlimited number of individual invoices in a single Java 
> process (i.e. the user chooses the option to print).  For example, print 
> 2,000 invoices where each  invoice contains 100 lines of details.  
> Therefore, print a total of 200,000 lines of detail.
> 
> However, I receive an "Out of Memory" error from Java when I attempt to 
> print a single invoice  that contains more than 4,500 lines of detail.

Have you read: http://xmlgraphics.apache.org/fop/0.94/running.html#memory

Specifically the part about breaking up the FO into multiple page sequences.

> 
> Other than continuing to increase the amount of memory at startup, is 
> there something I can do to prevent the error when printing a single, 
> large invoice? 

Regards,

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Out of Memory Error from Java

Posted by "Steffanina, Jeff" <Je...@marriott.com>.
David,
Thanks for the additional input.   As your excellent article implies,
the solution is not as easy to implement as the concept implies.   

Specifically, my region-body is primarily a single, four-column, table
that is eventually followed by some summary text.  When the table
contains more than 4,500 lines I get the out-of-memory error.
Currently, the entire invoice is one page-sequence.  Your approach
appears to solve that problem and will keep the paging in tact.  My
problem is finding a way to create multiple page-seq inside a single
table without ruining the spacing.

I am working on that now.

Thanks......    Any additional thoughts/examples would be greatly
appreciated.
Here is my code.

LINE 64 =   <fo:page-sequence master-reference="multi">
...
...
...
...
LINE 335 = 
 <fo:table table-layout="fixed" line-height=".10in"
        white-space-collapse="false" width="100%"
border-collapse="collapse"
        fox:orphan-content-limit="1in">
        <fo:table-column column-width=".02in"/>
        <fo:table-column column-width="1.35in"/>
        <fo:table-column column-width="2.9in"/>
        <fo:table-column column-width=".69in"/>
        <fo:table-column column-width=".80in"/>

        <fo:table-body>
          <xsl:attribute
name="white-space-collapse">false</xsl:attribute>
          <xsl:apply-templates select="./detail-line"/>
          <xsl:apply-templates select="./total-line"/>
        </fo:table-body>

     </fo:table>

....
.....
.....


LINE 479 =     </fo:page-sequence>

Jeff 


-----Original Message-----
From: DavidJKelly [mailto:dkelly@scriptorium.com] 
Sent: Friday, January 23, 2009 8:24 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Out of Memory Error from Java


At the risk of providing a redundant answer, I would also like to point
out a
paper I wrote on a specific method for creating multiple page sequences
in
the DITA Open Toolkit.  It provides code examples and explanations for
some
of the "gotchas" in using multiple page sequences.  There may be
information
in this approach that you or others in this community would find
helpful.

http://www.scriptorium.com/whitepapers/xslfo/index.html

Regards,
David Kelly



Steffanina, Jeff wrote:
> 
> 
> I read the article that you referenced below.   It suggests using
> multiple page sequences.  Currently, I have only one.
> 
> I will make that change and test it.
> 
> THANKS for the info!
> 
> 
> 
> Jeff 
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Chris Bowditch [mailto:bowditch_chris@hotmail.com] 
> Sent: Thursday, January 22, 2009 4:11 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Out of Memory Error from Java
> 
> Steffanina, Jeff wrote:
> 
>> I have:
>>         FOP 0.95
>>         Linux
>>             Java 1.5
>> My Java starts with memory set as:      -Xmx192m
>> 
>> I can print an unlimited number of individual invoices in a single
> Java 
>> process (i.e. the user chooses the option to print).  For example,
> print 
>> 2,000 invoices where each  invoice contains 100 lines of details.  
>> Therefore, print a total of 200,000 lines of detail.
>> 
>> However, I receive an "Out of Memory" error from Java when I attempt
> to 
>> print a single invoice  that contains more than 4,500 lines of
detail.
> 
> Have you read:
> http://xmlgraphics.apache.org/fop/0.94/running.html#memory
> 
> Specifically the part about breaking up the FO into multiple page
> sequences.
> 
>> 
>> Other than continuing to increase the amount of memory at startup, is

>> there something I can do to prevent the error when printing a single,

>> large invoice? 
> 
> Regards,
> 
> Chris
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Out-of-Memory-Error-from-Java-tp21591957p21624377.
html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Out of Memory Error from Java

Posted by DavidJKelly <dk...@scriptorium.com>.
At the risk of providing a redundant answer, I would also like to point out a
paper I wrote on a specific method for creating multiple page sequences in
the DITA Open Toolkit.  It provides code examples and explanations for some
of the "gotchas" in using multiple page sequences.  There may be information
in this approach that you or others in this community would find helpful.

http://www.scriptorium.com/whitepapers/xslfo/index.html

Regards,
David Kelly



Steffanina, Jeff wrote:
> 
> 
> I read the article that you referenced below.   It suggests using
> multiple page sequences.  Currently, I have only one.
> 
> I will make that change and test it.
> 
> THANKS for the info!
> 
> 
> 
> Jeff 
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Chris Bowditch [mailto:bowditch_chris@hotmail.com] 
> Sent: Thursday, January 22, 2009 4:11 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Out of Memory Error from Java
> 
> Steffanina, Jeff wrote:
> 
>> I have:
>>         FOP 0.95
>>         Linux
>>             Java 1.5
>> My Java starts with memory set as:      -Xmx192m
>> 
>> I can print an unlimited number of individual invoices in a single
> Java 
>> process (i.e. the user chooses the option to print).  For example,
> print 
>> 2,000 invoices where each  invoice contains 100 lines of details.  
>> Therefore, print a total of 200,000 lines of detail.
>> 
>> However, I receive an "Out of Memory" error from Java when I attempt
> to 
>> print a single invoice  that contains more than 4,500 lines of detail.
> 
> Have you read:
> http://xmlgraphics.apache.org/fop/0.94/running.html#memory
> 
> Specifically the part about breaking up the FO into multiple page
> sequences.
> 
>> 
>> Other than continuing to increase the amount of memory at startup, is 
>> there something I can do to prevent the error when printing a single, 
>> large invoice? 
> 
> Regards,
> 
> Chris
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Out-of-Memory-Error-from-Java-tp21591957p21624377.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Out of Memory Error from Java

Posted by "Steffanina, Jeff" <Je...@marriott.com>.
I read the article that you referenced below.   It suggests using
multiple page sequences.  Currently, I have only one.

I will make that change and test it.

THANKS for the info!



Jeff 





-----Original Message-----
From: Chris Bowditch [mailto:bowditch_chris@hotmail.com] 
Sent: Thursday, January 22, 2009 4:11 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Out of Memory Error from Java

Steffanina, Jeff wrote:

> I have:
>         FOP 0.95
>         Linux
>             Java 1.5
> My Java starts with memory set as:      -Xmx192m
> 
> I can print an unlimited number of individual invoices in a single
Java 
> process (i.e. the user chooses the option to print).  For example,
print 
> 2,000 invoices where each  invoice contains 100 lines of details.  
> Therefore, print a total of 200,000 lines of detail.
> 
> However, I receive an "Out of Memory" error from Java when I attempt
to 
> print a single invoice  that contains more than 4,500 lines of detail.

Have you read:
http://xmlgraphics.apache.org/fop/0.94/running.html#memory

Specifically the part about breaking up the FO into multiple page
sequences.

> 
> Other than continuing to increase the amount of memory at startup, is 
> there something I can do to prevent the error when printing a single, 
> large invoice? 

Regards,

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org