The excel file created is 50MB. It has a few sheets (about 10) and only rows and columns. No charts or pictures.
Regards, -Mohan On Mon, Oct 27, 2014 at 3:28 PM, David kerber <[email protected]> wrote: > On 10/27/2014 3:14 PM, Mohan Nuggehally wrote: > >> I get this error when I try to create an excel sheet using xssf. All I am >> doing is creating rows and columns by reading contents from a file. Of >> course when I change the max heap size from 1GB to 6GB it works. I wonder >> if 1GB is really too small or is the code bad and therefore requires a >> huge >> heap. Any experiences ? Here is the error stack. >> > > How many rows and columns, and what is the total size of the data? My > first suspicion would be a memory leak, but if you're making really big > files, it could be legit. > > > > > ------------- >> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space >> at >> org.apache.poi.ss.util.CellReference.convertNumToColString( >> CellReference.java:433) >> at >> org.apache.poi.ss.util.CellReference.appendCellReference( >> CellReference.java:492) >> at >> org.apache.poi.ss.util.CellReference.formatAsString( >> CellReference.java:455) >> at org.apache.poi.xssf.usermodel.XSSFCell.setCellNum(XSSFCell. >> java:710) >> at org.apache.poi.xssf.usermodel.XSSFRow.createCell(XSSFRow. >> java:175) >> at org.apache.poi.xssf.usermodel.XSSFRow.createCell(XSSFRow. >> java:147) >> at org.apache.poi.xssf.usermodel.XSSFRow.createCell(XSSFRow.java:39) >> at >> GraphWriteFull_to_Excel.create_sheet(GraphWriteFull_to_Excel.java:150) >> at GraphWriteFull_to_Excel.main(GraphWriteFull_to_Excel.java:79) >> ---------------- >> The error stack is different as below when I set the max heap size to 4GB >> -------------- >> Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit >> exceeded >> at java.util.Arrays.copyOfRange(Arrays.java:2694) >> at java.lang.String.<init>(String.java:203) >> at java.lang.String.copyValueOf(String.java:2908) >> at java.io.StreamTokenizer.nextToken(StreamTokenizer.java:702) >> at >> GraphWriteFull_to_Excel.create_sheet(GraphWriteFull_to_Excel.java:151) >> at GraphWriteFull_to_Excel.main(GraphWriteFull_to_Excel.java:79) >> --------------- >> I appreciate any feedback. >> >> Regards, >> -Mohan >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Mohan Nuggehally Senior Developer, Es-ice Office: Direct dial: 1-631-760-3244 Internal extension: 25172 New York
