I resolved this by upgrading my JVM to the latest Sun version (1.6) and
now it runs to completion with default JVM settings.
Alastair Gregory wrote:
I'm using iText merging six PDFs approx. 3.7MB each, into a single
output document. When running on Linux (Fedora Core 6) using the Fedora
"gij" JVM at Java version1.4.2 I get a crash on closing the output document:
ExceptionConverter: java.io.IOException: Cannot allocate memory
at gnu.java.nio.channels.FileChannelImpl.mapImpl(libgcj.so.7)
at gnu.java.nio.channels.FileChannelImpl.map(libgcj.so.7)
at com.lowagie.text.pdf.MappedRandomAccessFile.init(Unknown Source)
at com.lowagie.text.pdf.MappedRandomAccessFile.<init>(Unknown Source)
at com.lowagie.text.pdf.RandomAccessFileOrArray.reOpen(Unknown Source)
at com.lowagie.text.pdf.PdfReader.getStreamBytesRaw(Unknown Source)
at com.lowagie.text.pdf.PRStream.toPdf(Unknown Source)
at com.lowagie.text.pdf.PdfIndirectObject.writeTo(Unknown Source)
at com.lowagie.text.pdf.PdfWriter$PdfBody.add(Unknown Source)
at com.lowagie.text.pdf.PdfWriter$PdfBody.add(Unknown Source)
at com.lowagie.text.pdf.PdfWriter.addToBody(Unknown Source)
at com.lowagie.text.pdf.PdfReaderInstance.writeAllVisited(Unknown Source)
at com.lowagie.text.pdf.PdfReaderInstance.writeAllPages(Unknown Source)
at com.lowagie.text.pdf.PdfWriter.addSharedObjectsToBody(Unknown Source)
at com.lowagie.text.pdf.PdfWriter.close(Unknown Source)
at com.lowagie.text.pdf.PdfDocument.close(Unknown Source)
at com.lowagie.text.Document.close(Unknown Source)
at program.main(program.java:156)
I've tried pushing up the memory: for example java -Xmx200m , but this
gives no improvement. Can anyone suggest a solution?
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/
--
Alastair J. Gregory
Information Planning & Management Service, Inc.
21592 Atlantic Boulevard
Suite 110
Sterling, Virginia 20166
(703) 421-5500
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/