java.lang.OutOfMemoryError: Java heap space
Copy link to clipboard
Copied
I am using FM 12 to output PDF by using DITA-OT. But I get the following message:
BUILD FAILED
D:\DITA-OT1.8.5\build.xml:44: The following error occurred while executing this line:
D:\DITA-OT1.8.5\plugins\org.dita.pdf2\build.xml:150: The following error occurred while executing this line:
D:\DITA-OT1.8.5\plugins\org.dita.pdf2\build_fop.xml:175: java.lang.OutOfMemoryError: Java heap space
at org.apache.commons.io.output.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:237)
at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:219)
at org.apache.fop.fonts.truetype.FontFileReader.init(FontFileReader.java:45)
at org.apache.fop.fonts.truetype.FontFileReader.<init>(FontFileReader.java:74)
at org.apache.fop.fonts.truetype.TTFFontLoader.read(TTFFontLoader.java:104)
at org.apache.fop.fonts.truetype.TTFFontLoader.read(TTFFontLoader.java:91)
at org.apache.fop.fonts.FontLoader.getFont(FontLoader.java:205)
at org.apache.fop.fonts.FontLoader.loadFont(FontLoader.java:154)
at org.apache.fop.fonts.FontLoader.loadFont(FontLoader.java:115)
at org.apache.fop.fonts.autodetect.FontInfoFinder.find(FontInfoFinder.java:251)
at org.apache.fop.fonts.FontAdder.add(FontAdder.java:58)
at org.apache.fop.fonts.FontDetector.detect(FontDetector.java:95)
at org.apache.fop.fonts.FontInfoConfigurator.configure(FontInfoConfigurator.java:94)
at org.apache.fop.render.PrintRendererConfigurator.buildFontList(PrintRendererConfigurator.java:109)
at org.apache.fop.render.PrintRendererConfigurator.setupFontInfo(PrintRendererConfigurator.java:132)
at org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:170)
at org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:188)
at org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:75)
at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135)
at org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:105)
at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:358)
at org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:105)
at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:100)
at org.apache.fop.apps.Fop.<init>(Fop.java:78)
at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:297)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:109)
at org.apache.fop.tools.anttasks.FOPTaskStarter.renderInputHandler(Fop.java:653)
at org.apache.fop.tools.anttasks.FOPTaskStarter.render(Fop.java:676)
at org.apache.fop.tools.anttasks.FOPTaskStarter.run(Fop.java:534)
at org.apache.fop.tools.anttasks.Fop.execute(Fop.java:366)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
Can anyone show me how to fix it?
[Message moved to Strucutred Forum by moderator]
Copy link to clipboard
Copied
This looks like a DITA-OT installation issue, and likely that your Java environment isn't set up with enough memory. Before trying to use the FM-OT connector, make sure you can run and build the OT from the command line. For questions about setting up the DITA-OT, you should email the "dita-users" list on Yahoo Groups. Don't muddle the waters by mentioning FrameMaker, just get your OT environment set up and working .. once that's done, then try the FM-OT connector.
Note that in order to do a PDF build via the OT, you will also need to install Apache FOP (or similar) processor as well.
Good luck!
...scott
Copy link to clipboard
Copied
Here is what I find:
Increasing Java memory allocation
I increased the memory to 2000M but still I get the same errot message.
Copy link to clipboard
Copied
Have you tested this from the command line? As I said, you must make sure the OT is set up and functioning properly from the command line before trying it through FrameMaker.
Once you've done that, you should send your question to the dita-users Yahoo Group. These issues can be very complex, and you'll likely get better assistance from that list. Remember, don't confuse the issue by talking about FrameMaker. This is most likely an OT issue, that requires some environment modifications.
Good luck.
...scott

