Java heap out of memory error when creating pdf file using zen reports.

321 views
Skip to first unread message

Rich Brim

unread,
Mar 20, 2012, 9:33:40 PM3/20/12
to InterSystems: Zen Community
I was creating a large pdf document and received this error. How do I
increase memory? I googled the error and found some answers, but would
feel much better getting the info front the Zen exports.
Also, can I still create the pdf with the existing xml and xsl?

thanks,
Rich

Jonathan Levinson

unread,
Mar 21, 2012, 9:57:42 AM3/21/12
to intersys...@googlegroups.com
In the worst case, your report may be too large to render, even after adjusting the -Xmx parameter, which I'm sure you've read about. Is your architecture 32-bit or 64-bit? How much physical memory is free? How many records are in your XML file?

You can adjust the maximum heap size Java will allocate by doing the following.

You edit fop.bat and adjust the -Xmx parameter:

set JAVAOPTS=-Xmx512m -Denv.windir=%WINDIR% -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl

You must be careful not to choose an -Xmx size which is bigger than available physical memory or performance will suffer greatly.

You can create the pdf with the exiting xml and xsl if you have enough memory.

Best Regards,
Jonathan Levinson
Senior Software Developer
Object Group
InterSystems
jonathan...@intersystems.com

> --
> You received this message because you are subscribed to the Google Groups
> "InterSystems: Zen Community" group.
> To post to this group, send email to InterSys...@googlegroups.com To
> unsubscribe from this group, send email to InterSystems-ZEN-
> unsub...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/InterSystems-ZEN?hl=en
> Zen Community Terms and Conditions:
> http://groups.google.com/group/InterSystems-ZEN/web/community-terms-
> and-conditions

Rich Brim

unread,
Mar 21, 2012, 2:40:52 PM3/21/12
to InterSystems: Zen Community

The machine is 64 bit and 2 g of memory. The report was about 600
pages.


I will adjust heap size and see how it goes.

What is the command to recreate pdf from xmla nd xsl?

Rich

Jonathan Levinson

unread,
Mar 21, 2012, 2:44:10 PM3/21/12
to intersys...@googlegroups.com
2 Gig isn't a lot of memory. I wouldn't be surprised if it isn't big enough to render 600 pages.

Here is an example of generating a pdf from xml and xsl files.

c:\intersystems\cache121\fop\fop.bat -c c:\intersystems\cache121\fop\conf\fop.xconf -xml TestTable.xml -xsl TestTable.xsl -pdf TestTable.pdf

Best Regards,
Jonathan Levinson
Senior Software Developer
Object Group
InterSystems
jonathan...@intersystems.com


> -----Original Message-----
> From: intersys...@googlegroups.com [mailto:intersystems-
> z...@googlegroups.com] On Behalf Of Rich Brim
> Sent: Wednesday, March 21, 2012 2:41 PM
> To: InterSystems: Zen Community
> Subject: [InterSystems-Zen] Re: Java heap out of memory error when creating
> pdf file using zen reports.
>
>

Dawn Wolthuis

unread,
Mar 21, 2012, 4:16:20 PM3/21/12
to intersys...@googlegroups.com
Hey Jonathan -- 2 gig is a HUGE amount of memory -- how young are you?
smiles. --dawn

> To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com

--
Dawn M. Wolthuis

Take and give some delight today

Vlado

unread,
Mar 21, 2012, 6:37:52 PM3/21/12
to intersys...@googlegroups.com
Windows 7 works well wit 6gig(with 4 gig works slowly).
And now Windows 8 is coming, so prepare for 8 gig:) 


On Wednesday, March 21, 2012 12:16:20 PM UTC-8, DawnW wrote:
Hey Jonathan -- 2 gig is a HUGE amount of memory -- how young are you?
 smiles.  --dawn

On Wed, Mar 21, 2012 at 1:44 PM, Jonathan Levinson
<Jonathan.Levinson@intersystems.com> wrote:
> 2 Gig isn't a lot of memory.  I wouldn't be surprised if it isn't big enough to render 600 pages.
>
> Here is an example of generating a pdf from xml and xsl files.
>
> c:\intersystems\cache121\fop\fop.bat -c c:\intersystems\cache121\fop\conf\fop.xconf -xml TestTable.xml -xsl TestTable.xsl -pdf TestTable.pdf
>
> Best Regards,
> Jonathan Levinson
> Senior Software Developer
> Object Group
> InterSystems


>
>
>> -----Original Message-----
>> From: intersystems-zen@googlegroups.com [mailto:intersystems-
>> z...@googlegroups.com] On Behalf Of Rich Brim
>> Sent: Wednesday, March 21, 2012 2:41 PM
>> To: InterSystems: Zen Community
>> Subject: [InterSystems-Zen] Re: Java heap out of memory error when creating
>> pdf file using zen reports.
>>
>>
>> The machine is 64 bit and 2 g of memory. The report was about 600 pages.
>>
>>
>> I will adjust heap size and see how it goes.
>>
>> What is the command to recreate pdf from xmla nd xsl?
>>
>> Rich
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "InterSystems: Zen Community" group.

>> To post to this group, send email to InterSystems-ZEN@googlegroups.com To


>> unsubscribe from this group, send email to InterSystems-ZEN-
>> unsub...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/InterSystems-ZEN?hl=en
>> Zen Community Terms and Conditions:
>> http://groups.google.com/group/InterSystems-ZEN/web/community-terms-
>> and-conditions
>
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.

> To post to this group, send email to InterSystems-ZEN@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-ZEN-unsubscribe@googlegroups.com

--
Dawn M. Wolthuis

Take and give some delight today


On Wednesday, March 21, 2012 12:16:20 PM UTC-8, DawnW wrote:
Hey Jonathan -- 2 gig is a HUGE amount of memory -- how young are you?
 smiles.  --dawn

On Wed, Mar 21, 2012 at 1:44 PM, Jonathan Levinson
<Jonathan.Levinson@intersystems.com> wrote:
> 2 Gig isn't a lot of memory.  I wouldn't be surprised if it isn't big enough to render 600 pages.
>
> Here is an example of generating a pdf from xml and xsl files.
>
> c:\intersystems\cache121\fop\fop.bat -c c:\intersystems\cache121\fop\conf\fop.xconf -xml TestTable.xml -xsl TestTable.xsl -pdf TestTable.pdf
>
> Best Regards,
> Jonathan Levinson
> Senior Software Developer
> Object Group
> InterSystems

> jonathan.levinson@intersystems.com


>
>
>> -----Original Message-----
>> From: intersystems-zen@googlegroups.com [mailto:intersystems-
>> z...@googlegroups.com] On Behalf Of Rich Brim
>> Sent: Wednesday, March 21, 2012 2:41 PM
>> To: InterSystems: Zen Community
>> Subject: [InterSystems-Zen] Re: Java heap out of memory error when creating
>> pdf file using zen reports.
>>
>>
>> The machine is 64 bit and 2 g of memory. The report was about 600 pages.
>>
>>
>> I will adjust heap size and see how it goes.
>>
>> What is the command to recreate pdf from xmla nd xsl?
>>
>> Rich
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "InterSystems: Zen Community" group.

>> To post to this group, send email to InterSystems-ZEN@googlegroups.com To


>> unsubscribe from this group, send email to InterSystems-ZEN-
>> unsub...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/InterSystems-ZEN?hl=en
>> Zen Community Terms and Conditions:
>> http://groups.google.com/group/InterSystems-ZEN/web/community-terms-
>> and-conditions
>
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.

> To post to this group, send email to InterSystems-ZEN@googlegroups.com
> To unsubscribe from this group, send email to InterSystems-ZEN-unsubscribe@googlegroups.com

Dawn Wolthuis

unread,
Mar 21, 2012, 8:16:27 PM3/21/12
to intersys...@googlegroups.com
Yeah, yeah, I know. I'm just sayin' cheers! --dawn

On Wed, Mar 21, 2012 at 5:37 PM, Vlado <vili...@earthlink.net> wrote:
> Windows 7 works well wit 6gig(with 4 gig works slowly).
> And now Windows 8 is coming, so prepare for 8 gig:)
>
>
> On Wednesday, March 21, 2012 12:16:20 PM UTC-8, DawnW wrote:
>>
>> Hey Jonathan -- 2 gig is a HUGE amount of memory -- how young are you?
>>  smiles.  --dawn
>>
>> On Wed, Mar 21, 2012 at 1:44 PM, Jonathan Levinson
>> <Jonathan...@intersystems.com> wrote:
>> > 2 Gig isn't a lot of memory.  I wouldn't be surprised if it isn't big
>> > enough to render 600 pages.
>> >
>> > Here is an example of generating a pdf from xml and xsl files.
>> >
>> > c:\intersystems\cache121\fop\fop.bat -c
>> > c:\intersystems\cache121\fop\conf\fop.xconf -xml TestTable.xml -xsl
>> > TestTable.xsl -pdf TestTable.pdf
>>
>> >
>> > Best Regards,
>> > Jonathan Levinson
>> > Senior Software Developer
>> > Object Group
>> > InterSystems

>> > jonathan...@intersystems.com


>> >
>> >
>> >> -----Original Message-----
>> >> From: intersys...@googlegroups.com [mailto:intersystems-
>> >> z...@googlegroups.com] On Behalf Of Rich Brim
>> >> Sent: Wednesday, March 21, 2012 2:41 PM
>> >> To: InterSystems: Zen Community
>> >> Subject: [InterSystems-Zen] Re: Java heap out of memory error when
>> >> creating
>> >> pdf file using zen reports.
>> >>
>> >>
>> >> The machine is 64 bit and 2 g of memory. The report was about 600
>> >> pages.
>> >>
>> >>
>> >> I will adjust heap size and see how it goes.
>> >>
>> >> What is the command to recreate pdf from xmla nd xsl?
>> >>
>> >> Rich
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "InterSystems: Zen Community" group.

>> >> To post to this group, send email to InterSys...@googlegroups.com


>> >> To
>>
>> >> unsubscribe from this group, send email to InterSystems-ZEN-
>> >> unsub...@googlegroups.com
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/InterSystems-ZEN?hl=en
>> >> Zen Community Terms and Conditions:
>> >> http://groups.google.com/group/InterSystems-ZEN/web/community-terms-
>> >> and-conditions
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "InterSystems: Zen Community" group.

>> > To post to this group, send email to InterSys...@googlegroups.com


>> > To unsubscribe from this group, send email to

>> > InterSystems-Z...@googlegroups.com


>>
>> > For more options, visit this group at
>> > http://groups.google.com/group/InterSystems-ZEN?hl=en
>> > Zen Community Terms and Conditions:
>> > http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
>>
>> --
>> Dawn M. Wolthuis
>>
>> Take and give some delight today
>
>
> On Wednesday, March 21, 2012 12:16:20 PM UTC-8, DawnW wrote:
>>
>> Hey Jonathan -- 2 gig is a HUGE amount of memory -- how young are you?
>>  smiles.  --dawn
>>
>> On Wed, Mar 21, 2012 at 1:44 PM, Jonathan Levinson
>> <Jonathan...@intersystems.com> wrote:
>> > 2 Gig isn't a lot of memory.  I wouldn't be surprised if it isn't big
>> > enough to render 600 pages.
>> >
>> > Here is an example of generating a pdf from xml and xsl files.
>> >
>> > c:\intersystems\cache121\fop\fop.bat -c
>> > c:\intersystems\cache121\fop\conf\fop.xconf -xml TestTable.xml -xsl
>> > TestTable.xsl -pdf TestTable.pdf
>>
>> >
>> > Best Regards,
>> > Jonathan Levinson
>> > Senior Software Developer
>> > Object Group
>> > InterSystems

>> > jonathan...@intersystems.com


>> >
>> >
>> >> -----Original Message-----
>> >> From: intersys...@googlegroups.com [mailto:intersystems-
>> >> z...@googlegroups.com] On Behalf Of Rich Brim
>> >> Sent: Wednesday, March 21, 2012 2:41 PM
>> >> To: InterSystems: Zen Community
>> >> Subject: [InterSystems-Zen] Re: Java heap out of memory error when
>> >> creating
>> >> pdf file using zen reports.
>> >>
>> >>
>> >> The machine is 64 bit and 2 g of memory. The report was about 600
>> >> pages.
>> >>
>> >>
>> >> I will adjust heap size and see how it goes.
>> >>
>> >> What is the command to recreate pdf from xmla nd xsl?
>> >>
>> >> Rich
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "InterSystems: Zen Community" group.

>> >> To post to this group, send email to InterSys...@googlegroups.com


>> >> To
>>
>> >> unsubscribe from this group, send email to InterSystems-ZEN-
>> >> unsub...@googlegroups.com
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/InterSystems-ZEN?hl=en
>> >> Zen Community Terms and Conditions:
>> >> http://groups.google.com/group/InterSystems-ZEN/web/community-terms-
>> >> and-conditions
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "InterSystems: Zen Community" group.

>> > To post to this group, send email to InterSys...@googlegroups.com


>> > To unsubscribe from this group, send email to

>> > InterSystems-Z...@googlegroups.com


>>
>> > For more options, visit this group at
>> > http://groups.google.com/group/InterSystems-ZEN?hl=en
>> > Zen Community Terms and Conditions:
>> > http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
>>
>> --
>> Dawn M. Wolthuis
>>
>> Take and give some delight today
>

> --
> You received this message because you are subscribed to the Google Groups
> "InterSystems: Zen Community" group.

> To post to this group, send email to InterSys...@googlegroups.com


> To unsubscribe from this group, send email to

> InterSystems-Z...@googlegroups.com

Reply all
Reply to author
Forward
0 new messages