Out of Memory Error

2005-02-23 Thread rohit . rastogi
Hi

Anyone have an idea about how to increase memory for FOP programaticaly.I
get Out of Memory error when I try to user the
transform() Method of the Transformer Class
Thanks
Rohit





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Again out of Memory Error -2

2002-06-05 Thread Balaji Loganathan
My xsl snippet.
   xsl:template match=/
 fo:root
 fo:layout-master-set
 ...
 /fo:layout-master-set
   fo:page-sequence master-reference=...
fo:static-content
  ...
fo:static-content
fo:flow
 !-- Table start --
 !-- Table header --
xsl:for-each select=codetest/detail
 !-- Table rows --
 xsl:value-of select=group/ ...
  ..
/xsl:for-each
 !-- Table end --
/fo:flow
  /fo:page-sequence
 /fo:root
   /xsl:template

my Xml snippet:

codetest
detail
group/
id/
sector/
quantity/ 
level/  
 .
 .
ANSI/
/detail
/codetest

Please give me some tips on going for multiple page
sequence.I'm having 1488 rows.



 --- Cyril Rognon [EMAIL PROTECTED] wrote:  I
suppose you are using FOP 0.20.3...
 Do you use as many page sequences as you can ?
 
 Long tables and long page sequences are known to
 increase the memory 
 requierments of FOP.
 error has nothing to do with xml. Xsl could be used
 to create additionnal 
 page sequences. List Archive shows you how.


http://www.sold.com.au - The Sold.com.au Big Brand Sale
- New PCs, notebooks, digital cameras, phones and more ... Sale ends June 12


Re: Again out of Memory Error -2

2002-06-05 Thread Cyril Rognon
Ok I'll try to answer both part 1 and 2 here :
as for the JVM memory parameter with servlet engines : Your servlet engine 
is executed in a JVM that must allow you to set memory parameters. I don't 
know about every ServletEngine or ApplicationServers but you can do this 
with Tomcat or Websphere so I guess it exists everywhere.

As for multiple page sequences, it is simply a fact that the current FOP 
implementation seems to keep a whole page sequence in memory before it 
writes it down. So the biggest bage sequence you have, the more heap size 
you need.

Therefore it can be helpfull to create separate page sequence anytime you 
can. In your case, it is the worst situation : one long table. You have to 
start and stop the table each time you want to change page-sequence. Some 
guy on the list had the same situation to deal with. He manage to have an 
average number of x row per pages. Then he twisted his XSLT stylesheet to 
take x rowData (detail element in your case) to build one page sequence 
containing one table with the x rows and so on.

He has ended with a 97 page-sequence document. This may be a little extreme 
but it works. The archive pointer I gave you does this trick.

In many case, you have to deal with many tables wich are not always 100 
pages long then you can place page-sequences every time you know you can 
have a page break.

I hope this helps.
Cyril


Re: Again out of Memory Error -2

2002-06-05 Thread Balaji Loganathan
Hi Cyril,
  Thanks a lot for replying.
   I'm using Tomcat 3.2,so I think there shd be
someway to imporve JVM heap size.
  Now I understood the multiple page sequence
advantage.I tried to change my to have XSLT to print
20 rows at a time,still coding/re-coding my XSLT to
get a good result and not yet completed.
  Since this is a one-off job,I converted my large XML
data to HTML,then I converted HTML to PDF using Adobe
distiller.So the task is done,but I'm half baked now
with my XSLT code.
 Thanks a lot for replying me at right time.
Regards
Balaji




 --- Cyril Rognon [EMAIL PROTECTED] wrote:  Ok
I'll try to answer both part 1 and 2 here :
 
 as for the JVM memory parameter with servlet engines
 : Your servlet engine 
 is executed in a JVM that must allow you to set
 memory parameters. I don't 
 know about every ServletEngine or ApplicationServers
 but you can do this 
 with Tomcat or Websphere so I guess it exists
 everywhere.
 
 As for multiple page sequences, it is simply a fact
 that the current FOP 
 implementation seems to keep a whole page sequence
 in memory before it 
 writes it down. So the biggest bage sequence you
 have, the more heap size 
 you need.
 
 Therefore it can be helpfull to create separate page
 sequence anytime you 
 can. In your case, it is the worst situation : one
 long table. You have to 
 start and stop the table each time you want to
 change page-sequence. Some 
 guy on the list had the same situation to deal with.
 He manage to have an 
 average number of x row per pages. Then he twisted
 his XSLT stylesheet to 
 take x rowData (detail element in your case) to
 build one page sequence 
 containing one table with the x rows and so on.
 
 He has ended with a 97 page-sequence document. This
 may be a little extreme 
 but it works. The archive pointer I gave you does
 this trick.
 
 In many case, you have to deal with many tables wich
 are not always 100 
 pages long then you can place page-sequences every
 time you know you can 
 have a page break.
 
 I hope this helps.
 
 Cyril
  

http://www.sold.com.au - The Sold.com.au Big Brand Sale
- New PCs, notebooks, digital cameras, phones and more ... Sale ends June 12


Again out of Memory Error

2002-06-04 Thread Balaji Loganathan
Hi,
  Recently many people were discussing abt avoiding
out of memory error,I read previous threads but
couldn't able to find solution for me.
   Is this error related to Number of pages or input
xml size.Because i have a xml with 1588 group of
element,which i have to render into PDF in table
format.I can minimize the page size by reducing the
font size.At present its generating upto 51 pages then
it throwing out of memory error.
  Some constraints..
   1.I have to embedd a new font called Arial UniCode
MS(the ttf file size is 23mb) for Unicodes.
   2.in xsl:for loop,i have used xsl:choose with 15
xsl:when's.
So is the error is related to XML file size or number
of pdfpages or xsl coding style. ??
  
 I can send xslxml personally if needed to avoid
unnecessary bulking.
  Please suggests.

Regards
Balaji

http://www.sold.com.au - The Sold.com.au Big Brand Sale
- New PCs, notebooks, digital cameras, phones and more ... Sale ends June 12


Re: Again out of Memory Error

2002-06-04 Thread Cyril Rognon
I suppose you are using FOP 0.20.3...
first, what amount of memory do you give to FOP ? meaning do you use -Xms 
and -Xmx jvm parameters to give Java JVM the memory needed ?

Second please state how many tables there are in your document, and how 
many pages long the longest table is.

Do you use as many page sequences as you can ?
Long tables and long page sequences are known to increase the memory 
requierments of FOP.
error has nothing to do with xml. Xsl could be used to create additionnal 
page sequences. List Archive shows you how.

I hope that helps.
Cyril
At 00:26 05/06/2002 +1000, you wrote:
Hi,
  Recently many people were discussing abt avoiding
out of memory error,I read previous threads but
couldn't able to find solution for me.



Re: Out of Memory Error !!

2002-05-09 Thread Jeremias Maerki
The problem is probably your page-number-citation that looks up the last
page. This is well known to have impact on memory usage, because FOP can
render the first page only after the last page has been setup. It has to
wait until it knows how many pages your page-sequence has.

Take out the page-number-citation and look if the problems go away. I'm
pretty sure they will. That means you might have to live with page x
instead of page x of y for now.

On 09.05.2002 11:18:59 Abhijat Upadhyay wrote:
 hi there !!
 
 i am sending u the code of my XSL and XML... though the code might be 
 slightly 
 big but if u r able to find a solution to it then nothing like it... this set 
 of XSL and XML should be able to print around 300 - 500 pages but currently 
 it 
 prints hardly 40...
 
 THE XSL CODE: -
snip/
 Page #fo:page-number/ of xsl:value-of 
 select=$page-count/
snip/
 /xsl:stylesheet
 
 THE XML CODE: -
 library
 pagetitleList of Books/pagetitle
 book
   titleDiscovery of India/title
   authorPandit Jawaharlal Nehru/author
   publisherTata McGraw Hill/publisher
   cover type='paperback'/
   category class='historical'/
   isbn1-23-456-7890/isbn
   rating number='5'/
   commentsTells about history of India right from its birth/comments
 /book
 ... mutiple book tags are there and finally the closing tag i.e.
 /library
 
 Currently i want to print around 3000 - 4000 rows of in a table in the PDF... 
 but the total page count does not go beyond 40... actually it should go to 
 140... similarly if the number of rows increases then the number of pages 
 will 
 also increase.
 NOTE: - this is just anexample XML.


Cheers,
Jeremias Maerki



Out of Memory Error !!

2002-05-08 Thread Abhijat Upadhyay
hi there !!

i am getting out of memory error when i try to process a very large document 
containing a single fo:page-sequence tag a single fo:table tag. i have gone 
thru the mailing list looking for some solution to this problem but though the 
problems are similar i am not able to figure out the soluition in my case... as 
i cannot have more than one page-sequence to display my actual data... i want 
to know what can be done to get rid of this problem

if some how i am able to break this page-sequence then i will be able to get 
rid of this problem... kindly help me out with this problem as i am a novice in 
with this FOP stuff.. if any further info is required then send a mail a 
[EMAIL PROTECTED]

thanx

lotza cheers !!
Abhijat Upadhyay


Re: Out of Memory Error !!

2002-05-08 Thread Naveen_Rojanala

Hi Abhijit,
Looks like it might be in a recursive mode or something.
I am not totally aware of this kind or problem ,but how big is your
document ?

Are you using the combination of xml and xsl filer or just the fo file to
print out in PDF?

naveen




   
  Abhijat Upadhyay  
   
  abhijat.upadhyayTo:   '[EMAIL PROTECTED]' 
[EMAIL PROTECTED] 
  @patni.com  cc:  
   
   Subject:  Out of Memory Error !! 
   
  05/08/02 02:44 PM 
   
  Please respond to 
   
  fop-user  
   

   

   




hi there !!

i am getting out of memory error when i try to process a very large
document
containing a single fo:page-sequence tag a single fo:table tag. i have gone

thru the mailing list looking for some solution to this problem but though
the
problems are similar i am not able to figure out the soluition in my
case... as
i cannot have more than one page-sequence to display my actual data... i
want
to know what can be done to get rid of this problem

if some how i am able to break this page-sequence then i will be able to
get
rid of this problem... kindly help me out with this problem as i am a
novice in
with this FOP stuff.. if any further info is required then send a mail a
[EMAIL PROTECTED]

thanx

lotza cheers !!
Abhijat Upadhyay