Skip to main content
Inspiring
December 23, 2013
Question

java.lang.OutOfMemoryError: Java heap space

  • December 23, 2013
  • 1 reply
  • 1094 views

Hello All,

I was trying to read an excel file in Coldfusion using the below code , but I got the following error.

Code :

<cfspreadsheet action="read" src="TestData.xlsx" sheet="1" rows="2-3" query="excelData">

Error :

  

Java heap space The specific sequence of files included or processed is: /mnt/cfcontent/icfinstance/cet/ceg_v2/readExcel.cfm, line: 5 "

java.lang.OutOfMemoryError: Java heap space.

Any one have any idea about this. Your help is well appreciated.

Thanks in advance

    This topic has been closed for replies.

    1 reply

    vishu_13
    Inspiring
    December 24, 2013

    Is it a formatted xlsx? Can you test with xls?

    Thanks

    VJ

    Inspiring
    December 26, 2013

    Sounds like you tried to read a multi-GB file completely into memory.

    Adam Cameron recently posted a similar instance and shows how reading the data in bits might be a better solution:

    http://cfmlblog.adamcameron.me/2013/12/file-looping-strategies-it-doesnt-seem.html