export to .xls - out ofg memory

User d329696e7a

01-02-2008 20:27:50

IJC on Mac G4, system 10.4.11





trying to export 115 structures to a .xls - the default 200x200 pixel images which doesn't show the structures clearly. When I increase to 400x400 (PNG format)





I get:


Code:



A java.lang.OutOfMemoryError exception has occurred.


   Click Show Details or see the messages.log file located in your /Users/pwolanin/Library/Application Support/instantjchem/ijc_2_2/var/log folder.











the log file has:








Code:
java.lang.OutOfMemoryError: Java heap space


        at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)


        at java.awt.image.Raster.createPackedRaster(Raster.java:458)


        at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)


        at java.awt.image.BufferedImage.<init>(BufferedImage.java:326)


        at chemaxon.marvin.modules.CreateImage.createBackground(CreateImage.java:37)


        at chemaxon.marvin.modules.CreateImage.callback(CreateImage.java:29)


        at chemaxon.marvin.modules.ImageExport.makeImage(ImageExport.java:382)


        at chemaxon.marvin.modules.ImageExport.convert(ImageExport.java:402)


        at chemaxon.marvin.modules.PngExport.convert(PngExport.java:65)


        at chemaxon.struc.Molecule.exportToObject(Molecule.java:1324)


        at chemaxon.struc.Molecule.exportToObject(Molecule.java:1289)


        at chemaxon.struc.Molecule.exportToBinFormat(Molecule.java:1205)


        at chemaxon.struc.Molecule.toBinFormat(Molecule.java:1182)


        at com.im.ijc.io.impl.exporter.ExcelPOIExporter.writeStructure(ExcelPOIExporter.java:178)


        at com.im.ijc.io.impl.exporter.ExcelExporter.doExport(ExcelExporter.java:212)


        at com.im.ijc.io.impl.exporter.ExcelExporter$ExcelConfig.performExport(ExcelExporter.java:340)


        at com.im.ijc.core.io.export.ExportRunner.startExport(ExportRunner.java:79)


        at com.im.ijc.core.io.export.ExportToFileWizardPanel3$1.run(ExportToFileWizardPanel3.java:101)


        at org.openide.util.Task.run(Task.java:244)


        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)


[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)


ChemAxon fa971619eb

01-02-2008 20:40:17

Excel export uses a 3rd party library (Jakarta POI) and the way this works is that the whole file needs to be held in memory until the end of the export process.





Obviously this has limitations in terms of the number of structures that can be exported and the size of the images.





You should try to increase the amount of available memory. Use Tools->Options and select the Miscellaneous tab and then the Startup options. Set the memory maximum size to a higher value. You can probably safely set the value to about half your available memory.





Tim