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 Ail Sahin <al...@as-support.com> on 2006/01/18 10:24:16 UTC

Gaining OutOfMemoryException during transforming

Hi guys,

I got a strange problem during transforming XML and a XSLT to PDF.
Using Version 0.20.5 of FOP.

First, I create accountstatements, i.e. for GL accounts, Debitor 
accounts or Creditor accounts.
The XML output for all GL accounts in one month is nearly 10 MB large.
Debitor/Creditor accounts of one month is much bigger, nearly 15 MB.

While transforming the Debitor/Creditor XML to PDF, there is no problem. 
The CPU usage rises up to 100%, but the rendering successes.
But with the smaller GL accounts XML I get an OutOfMemoryException.

What could be the reason?

BR...
Sahin


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


Re: Gaining OutOfMemoryException during transforming

Posted by Ail Sahin <al...@as-support.com>.
Chris Bowditch schrieb:
> Ail Sahin wrote:
>
>> Chris Bowditch schrieb:
>>
>>> Just to be clear: In answer (3) I'm not talking about FOP 0.91beta 
>>> or similar, I was referring to a 0.20.6 available as code only using 
>>> SVN.
>>>
>> Sorry for my noob question, but what is SVN? Found only code for FOP 
>> 0.91beta in the Trunk.
>
> No problem. SVN is source code repository. FOP 0.91beta was generated 
> from the trunk. However there is a branch for 0.20.x, which you should 
> download the unreleased code from.
>
> Point your SVN client to the URL:
>
> http://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain 
>
>
I got it. Thank you very much.

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


Re: Gaining OutOfMemoryException during transforming

Posted by Chris Bowditch <bo...@hotmail.com>.
Ail Sahin wrote:

> Chris Bowditch schrieb:
> 
>> Just to be clear: In answer (3) I'm not talking about FOP 0.91beta or 
>> similar, I was referring to a 0.20.6 available as code only using SVN.
>>
> Sorry for my noob question, but what is SVN? Found only code for FOP 
> 0.91beta in the Trunk.

No problem. SVN is source code repository. FOP 0.91beta was generated 
from the trunk. However there is a branch for 0.20.x, which you should 
download the unreleased code from.

Point your SVN client to the URL:

http://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain

Chris



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


Re: Gaining OutOfMemoryException during transforming

Posted by Ail Sahin <al...@as-support.com>.
Chris Bowditch schrieb:
> Just to be clear: In answer (3) I'm not talking about FOP 0.91beta or 
> similar, I was referring to a 0.20.6 available as code only using SVN.
>
Sorry for my noob question, but what is SVN? Found only code for FOP 
0.91beta in the Trunk.

Ali

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


Re: Gaining OutOfMemoryException during transforming

Posted by Chris Bowditch <bo...@hotmail.com>.
Ail Sahin wrote:

> Chris Bowditch schrieb:
> 
>> There are several options open to you:
>>
>> 1) increase JVM heap size.
>> 2) try it on FOP 0.91beta and see if problem remains
>> 3) download latest code from SVN maintenance branch. There were some 
>> changes made since 0.20.5 specifically aimed at reducing memory 
>> consumption of tables.
> 
> Thanks a lot for your answers, by the way.
> I realized that my FO doesn't work with FOP 0.91beta. Seems that I have 
> to do some modifications on it.

Just to be clear: In answer (3) I'm not talking about FOP 0.91beta or 
similar, I was referring to a 0.20.6 available as code only using SVN.

Chris



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


Re: Gaining OutOfMemoryException during transforming

Posted by Ail Sahin <al...@as-support.com>.
Chris Bowditch schrieb:
> There are several options open to you:
>
> 1) increase JVM heap size.
> 2) try it on FOP 0.91beta and see if problem remains
> 3) download latest code from SVN maintenance branch. There were some 
> changes made since 0.20.5 specifically aimed at reducing memory 
> consumption of tables.
Thanks a lot for your answers, by the way.
I realized that my FO doesn't work with FOP 0.91beta. Seems that I have 
to do some modifications on it.

Ali


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


Re: Gaining OutOfMemoryException during transforming

Posted by Chris Bowditch <bo...@hotmail.com>.
Ail Sahin wrote:

> Chris Bowditch schrieb:

<snip/>

> 
>> Well the actual FO size is not stricly directly proportional to memory 
>> usage. It's slightly more complex than that. Memory usage depends on 
>> the exact FO used. For example, fo:table and nested tables in 
>> particular are very expensive in terms of memory and CPU. 
> 
> You're right, there are a lot of tables in the FO. But how could I 
> manage design an account statement without tables?

I'm not suggesting you can. There are several options open to you:

1) increase JVM heap size.
2) try it on FOP 0.91beta and see if problem remains
3) download latest code from SVN maintenance branch. There were some 
changes made since 0.20.5 specifically aimed at reducing memory 
consumption of tables.

<snip/>

Chris



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


Re: Gaining OutOfMemoryException during transforming

Posted by Ail Sahin <al...@as-support.com>.
Chris Bowditch schrieb:
> Ail Sahin wrote:
>
>> Hi guys,
>>
>> I got a strange problem during transforming XML and a XSLT to PDF.
>> Using Version 0.20.5 of FOP.
>>
>> First, I create accountstatements, i.e. for GL accounts, Debitor 
>> accounts or Creditor accounts.
>> The XML output for all GL accounts in one month is nearly 10 MB large.
>> Debitor/Creditor accounts of one month is much bigger, nearly 15 MB.
>>
>> While transforming the Debitor/Creditor XML to PDF, there is no 
>> problem. The CPU usage rises up to 100%, but the rendering successes.
>> But with the smaller GL accounts XML I get an OutOfMemoryException.
>
> Well the actual FO size is not stricly directly proportional to memory 
> usage. It's slightly more complex than that. Memory usage depends on 
> the exact FO used. For example, fo:table and nested tables in 
> particular are very expensive in terms of memory and CPU. 
You're right, there are a lot of tables in the FO. But how could I 
manage design an account statement without tables?
> It may also be that the FO for GL, has just one page-sequence whilst 
> the Debitor/Creditor accounts are split up into multiple page-sequences.
>
That's the funny thing: It's all the same FO.

Ali

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


Re: Gaining OutOfMemoryException during transforming

Posted by Chris Bowditch <bo...@hotmail.com>.
Ail Sahin wrote:

> Hi guys,
> 
> I got a strange problem during transforming XML and a XSLT to PDF.
> Using Version 0.20.5 of FOP.
> 
> First, I create accountstatements, i.e. for GL accounts, Debitor 
> accounts or Creditor accounts.
> The XML output for all GL accounts in one month is nearly 10 MB large.
> Debitor/Creditor accounts of one month is much bigger, nearly 15 MB.
> 
> While transforming the Debitor/Creditor XML to PDF, there is no problem. 
> The CPU usage rises up to 100%, but the rendering successes.
> But with the smaller GL accounts XML I get an OutOfMemoryException.

Well the actual FO size is not stricly directly proportional to memory 
usage. It's slightly more complex than that. Memory usage depends on the 
exact FO used. For example, fo:table and nested tables in particular are 
very expensive in terms of memory and CPU. It may also be that the FO 
for GL, has just one page-sequence whilst the Debitor/Creditor accounts 
are split up into multiple page-sequences.

Chris



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


Re: Base URL in userconfig does not work

Posted by Uwe Klosa <uw...@ub.uu.se>.
Thanks for this information. I will use trunk in the future.

Uwe

Jeremias Maerki wrote:
> This has recently been fixed/added. See http://xmlgraphics.apache.org/fop/changes.html#version_FOP%20Trunk
> It will be available in the next release. Until then, you can work with
> a Subversion checkout of FOP Trunk.
> 
> 
> On 18.01.2006 11:55:20 Uwe Klosa wrote:
>> I have created a FopServlet on basis of the example servlet in 0.91. I use my own configuration file and it works fine with absolute 
>> paths to my font metrics and ttf files. But I want to use relative paths and this does not work. If I set 
>> <base>file:///mnt/data/fonts/</base> the logger writes out setting BaseURL to file:///mnt/data/fonsts/</base>. When I then render a 
>> file to pdf FOP tries to read the metrics and ttf files from /usr/share/jboss/bin/.
>>
>> Is this a known bug or have I misunderstood the meaning of <base>?
>>
>> Cheers
>> Uwe
> 
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 

Re: Base URL in userconfig does not work

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
This has recently been fixed/added. See http://xmlgraphics.apache.org/fop/changes.html#version_FOP%20Trunk
It will be available in the next release. Until then, you can work with
a Subversion checkout of FOP Trunk.


On 18.01.2006 11:55:20 Uwe Klosa wrote:
> I have created a FopServlet on basis of the example servlet in 0.91. I use my own configuration file and it works fine with absolute 
> paths to my font metrics and ttf files. But I want to use relative paths and this does not work. If I set 
> <base>file:///mnt/data/fonts/</base> the logger writes out setting BaseURL to file:///mnt/data/fonsts/</base>. When I then render a 
> file to pdf FOP tries to read the metrics and ttf files from /usr/share/jboss/bin/.
> 
> Is this a known bug or have I misunderstood the meaning of <base>?
> 
> Cheers
> Uwe



Jeremias Maerki


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


Base URL in userconfig does not work

Posted by Uwe Klosa <uw...@ub.uu.se>.
I have created a FopServlet on basis of the example servlet in 0.91. I use my own configuration file and it works fine with absolute 
paths to my font metrics and ttf files. But I want to use relative paths and this does not work. If I set 
<base>file:///mnt/data/fonts/</base> the logger writes out setting BaseURL to file:///mnt/data/fonsts/</base>. When I then render a 
file to pdf FOP tries to read the metrics and ttf files from /usr/share/jboss/bin/.

Is this a known bug or have I misunderstood the meaning of <base>?

Cheers
Uwe