Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

java.lang.OutOfMemoryError: Java heap space

Explorer ,
Dec 22, 2013 Dec 22, 2013

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

1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 24, 2013 Dec 24, 2013

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

Thanks

VJ

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 26, 2013 Dec 26, 2013
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources