[ 
http://jira.codehaus.org/browse/MPPDF-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139417#action_139417
 ] 

Lukas Theussl commented on MPPDF-62:
------------------------------------

Hi Andy,

I can reproduce your problem. However, I get the same OOME when running fop 
from the command line on the generated fo file, which means that the plugin is 
not at fault. What I actually don't understand is why it works with plugin 
2.2.1.

I verified that in your case it's the table of contents that is responsible for 
the OOME. This is a well-known issue with forward references [1], I removed the 
toc creation from the xsl transformation and your pdf was created fine. So the 
question is if you want/need the toc, we can easily add an option to skip the 
toc generation (and rely on pdf bookmarks) or maybe move the toc to the end of 
the file, which would avoid the forward references (still need to check if this 
actually works).

[1] http://xmlgraphics.apache.org/fop/0.94/running.html#memory

> OutOfMemoryError using Maven 1.1 and v2.5.1 but works with Maven1.0 and v2.2.1
> ------------------------------------------------------------------------------
>
>                 Key: MPPDF-62
>                 URL: http://jira.codehaus.org/browse/MPPDF-62
>             Project: Maven 1.x PDF Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5.1
>            Reporter: Andy Jefferson
>
> The following project
> svn co 
> https://datanucleus.svn.sourceforge.net/svnroot/datanucleus/documentation/accessplatform.datanucleus.org/trunk
>  datanucleus
> when running "maven clean pdf" runs fine when using Maven1.0 and plugin 
> 2.2.1. Just tried with Maven1.1 and plugin 2.5.1 and it gives
>     [java] [INFO] [297]
>     [java] [INFO] [298]
>     [java] [INFO] [299]
>     [java] [INFO] [300]
>     [java] [INFO] [301]
>     [java] [INFO] [302]
>     [java] Exception in thread "main" java.lang.OutOfMemoryError: Java heap 
> space
>     [java]      at java.lang.String.<init>(String.java:208)
>     [java]      at java.lang.StringBuilder.toString(StringBuilder.java:431)
>     [java]      at 
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
>     [java]      at java.lang.Integer.parseInt(Integer.java:447)
>     [java]      at java.lang.Integer.parseInt(Integer.java:497)
>     [java]      at 
> org.apache.fop.layout.FontInfo.createFontKey(FontInfo.java:130)
>     [java]      at org.apache.fop.layout.FontState.<init>(FontState.java:112)
>     [java]      at 
> org.apache.fop.fo.PropertyManager.getFontState(PropertyManager.java:117)
>     [java]      at org.apache.fop.fo.flow.TableCell.layout(TableCell.java:292)
>     [java]      at org.apache.fop.fo.flow.TableRow.layout(TableRow.java:360)
>     [java]      at 
> org.apache.fop.fo.flow.AbstractTableBody.layout(AbstractTableBody.java:236)
>     [java]      at org.apache.fop.fo.flow.Table.layout(Table.java:302)
>     [java]      at org.apache.fop.fo.flow.Block.layout(Block.java:257)
>     [java]      at org.apache.fop.fo.flow.Block.layout(Block.java:257)
>     [java]      at org.apache.fop.fo.flow.Block.layout(Block.java:257)
>     [java]      at org.apache.fop.fo.flow.Block.layout(Block.java:257)
>     [java]      at 
> org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:154)
>     [java]      at 
> org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:110)
>     [java]      at 
> org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:400)
>     [java]      at 
> org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:338)
>     [java]      at 
> org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262)
>     [java]      at 
> org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223)
>     [java]      at 
> org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
>     [java]      at 
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
>     [java]      at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>  Source)
>     [java]      at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
> Source)
>     [java]      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
> Source)
>     [java]      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
> Source)
>     [java]      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     [java]      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
> Source)
>     [java]      at 
> org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
>     [java]      at org.apache.fop.apps.Driver.render(Driver.java:498)
> It was running through quite quick til it got to 250 or so then slower and 
> slower. 
> Obviously will be different on each machine, but I have
> setenv MAVEN_OPTS "-Xmx512m -Xms512m"
> but have tried also with 1024 for both
> Anything I can set to get around this ?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to