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 Kr...@aps.com on 2007/02/15 22:25:08 UTC

Re: Exception in thread "main" java.lang.OutOfMemory Error

Hello All,

As i have discussed in the previous threads I get an  Exception in
thread "main" java.lang.OutOfMemory Error when I try to pdf xml
documents.

*	I tried increasing the memory available to the JVM (used this
command line option:
	C:\Program Files\Altova\FOP\build>java -Xmx512m -jar fop.jar fop
-xsl test.xsl -xml test.xml -pdf test.pdf ). This helped me convert a
777KB Xml document into a PDF Document(about 100 pages). But when I try
converting an 4500KB Xml Document(approx. about 400 pages long) it gives
me an out of memory error again.I can't increase the memory more than
that as my physical RAM is only 523 MB.
*	I donot have any figures in the document.
*	I do use a page numbering scheme that includes a total number of
pages in the document that makes use of forward referencingand I cannot
bypass this. 
*	I have three page sequences but I'm afraid can't break the
document into any more. And each sequence does contain a lot of fo
elements.

Can anybody guide me more  in regards to this?

Sindhu

Email Firewall made the following annotations
------------------------------------------------------------------------ NOTICE ---

This message is for the designated recipient only and may contain confidential, privileged or proprietary information. If you have received it in error, please notify the sender immediately and delete the original and any copy or printout. Unintended recipients are prohibited from making any other use of this e-mail. Although we have taken reasonable precautions to ensure no viruses are present in this e-mail, we accept no liability for any loss or damage arising from the use of this e-mail or attachments, or for any delay or errors or omissions in the contents which result from e-mail transmission.

---------------------------------------------------------------------

AW: [SPAM] Re: Exception in thread "main" java.lang.OutOfMemory Error

Posted by Hinrich Aue <hi...@lci-software.com>.
You can also use different xslt processors.
I'm using xsltproc.
Question - what is better. FOP or xsltproc? (for xsl processing of course)

-----Ursprüngliche Nachricht-----
Von: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
Gesendet: Freitag, 16. Februar 2007 16:31
An: fop-users@xmlgraphics.apache.org
Betreff: [SPAM] Re: Exception in thread "main" java.lang.OutOfMemory Error

Instead of:
fop -xsl test.xsl -xml test.xml -pdf test.pdf

you do:
fop -xsl test.xsl -xml test.xml -foout test.fo
and then
fop -fo test.fo -pdf test.pdf


On 16.02.2007 16:22:06 Krishna.Cherla wrote:
> 
> Hello,
> 
> I tried the process again after I upgraded the FOP version to 0.93. But
> it still gives me the same error though i increase the memory. 
> How do I seperate the XSLT process from the FO formatting ?Thanks for
> all the help being rendered.
> 
> Sindhu


Jeremias Maerki


---------------------------------------------------------------------
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: Exception in thread "main" java.lang.OutOfMemory Error

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Instead of:
fop -xsl test.xsl -xml test.xml -pdf test.pdf

you do:
fop -xsl test.xsl -xml test.xml -foout test.fo
and then
fop -fo test.fo -pdf test.pdf


On 16.02.2007 16:22:06 Krishna.Cherla wrote:
> 
> Hello,
> 
> I tried the process again after I upgraded the FOP version to 0.93. But
> it still gives me the same error though i increase the memory. 
> How do I seperate the XSLT process from the FO formatting ?Thanks for
> all the help being rendered.
> 
> Sindhu


Jeremias Maerki


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


AW: [SPAM] Re: Exception in thread "main" java.lang.OutOfMemory Error

Posted by Hinrich Aue <hi...@lci-software.com>.
I had the same problem using fop 0.20.5.
Memory usage seems to have reduced a lot in FOP 0.93.
Maybe that's it?

Hinrich

-----Ursprüngliche Nachricht-----
Von: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
Gesendet: Freitag, 16. Februar 2007 10:39
An: fop-users@xmlgraphics.apache.org
Betreff: [SPAM] Re: Exception in thread "main" java.lang.OutOfMemory Error

Given what you told us it's unlikely that you can make it work without
more memory in your computer. Maybe, if we had access to your XML and
stylesheet, one of us might have another suggestion. It would also be
good for us to have a really large document like yours that we can do
tests with.

Anyway, I'd try to simplify the stylesheet as much as you can, doing as
much as you can with property inheritance. Remove any attribute that is
not absolutely necessary. Don't nest elements where it's not absolutely
necessary. Remove page numbering just as a test to see if it changes
anything. Separate the XSLT process from the FO formatting so these two
don't run at the same time. XSLT alone may use up quite a bit of memory.

Please give us feedback even if you manage to make it run. Thanks.

On 15.02.2007 22:25:08 Krishna.Cherla wrote:
> Hello All,
> 
> As i have discussed in the previous threads I get an  Exception in
> thread "main" java.lang.OutOfMemory Error when I try to pdf xml
> documents.
> 
> *	I tried increasing the memory available to the JVM (used this
> command line option:
> 	C:\Program Files\Altova\FOP\build>java -Xmx512m -jar fop.jar fop
> -xsl test.xsl -xml test.xml -pdf test.pdf ). This helped me convert a
> 777KB Xml document into a PDF Document(about 100 pages). But when I try
> converting an 4500KB Xml Document(approx. about 400 pages long) it gives
> me an out of memory error again.I can't increase the memory more than
> that as my physical RAM is only 523 MB.
> *	I donot have any figures in the document.
> *	I do use a page numbering scheme that includes a total number of
> pages in the document that makes use of forward referencingand I cannot
> bypass this. 
> *	I have three page sequences but I'm afraid can't break the
> document into any more. And each sequence does contain a lot of fo
> elements.
> 
> Can anybody guide me more  in regards to this?
> 
> Sindhu
> 


Jeremias Maerki


---------------------------------------------------------------------
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: Exception in thread "main" java.lang.OutOfMemory Error

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Given what you told us it's unlikely that you can make it work without
more memory in your computer. Maybe, if we had access to your XML and
stylesheet, one of us might have another suggestion. It would also be
good for us to have a really large document like yours that we can do
tests with.

Anyway, I'd try to simplify the stylesheet as much as you can, doing as
much as you can with property inheritance. Remove any attribute that is
not absolutely necessary. Don't nest elements where it's not absolutely
necessary. Remove page numbering just as a test to see if it changes
anything. Separate the XSLT process from the FO formatting so these two
don't run at the same time. XSLT alone may use up quite a bit of memory.

Please give us feedback even if you manage to make it run. Thanks.

On 15.02.2007 22:25:08 Krishna.Cherla wrote:
> Hello All,
> 
> As i have discussed in the previous threads I get an  Exception in
> thread "main" java.lang.OutOfMemory Error when I try to pdf xml
> documents.
> 
> *	I tried increasing the memory available to the JVM (used this
> command line option:
> 	C:\Program Files\Altova\FOP\build>java -Xmx512m -jar fop.jar fop
> -xsl test.xsl -xml test.xml -pdf test.pdf ). This helped me convert a
> 777KB Xml document into a PDF Document(about 100 pages). But when I try
> converting an 4500KB Xml Document(approx. about 400 pages long) it gives
> me an out of memory error again.I can't increase the memory more than
> that as my physical RAM is only 523 MB.
> *	I donot have any figures in the document.
> *	I do use a page numbering scheme that includes a total number of
> pages in the document that makes use of forward referencingand I cannot
> bypass this. 
> *	I have three page sequences but I'm afraid can't break the
> document into any more. And each sequence does contain a lot of fo
> elements.
> 
> Can anybody guide me more  in regards to this?
> 
> Sindhu
> 


Jeremias Maerki


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