AnsweredAssumed Answered

Java Heap Space issue while reading 50MB files

Question asked by yash.patel.c2 on Jul 3, 2019
Latest reply on Jul 3, 2019 by sanjaybandhniya

Hi everyone,

I want to read 50-100 MB CSV file in java script rule to update the details in Alfresco data list. But I am getting Java Heap space issue on the below line of code.

 

var items = companyhome.childByNamePath("/Sites/datalists/documentLibrary/Demo.csv").content;
Also I tried Java code in the below line as well.
                                             NodeRef csvNodeRef = rs.getNodeRef(0);
                                             System.out.println("csvNodeRef "+csvNodeRef);
                                             ContentReader cr = fileFolderService.getReader(csvNodeRef);
                                             FileInputStream fis = (FileInputStream) cr.getContentInputStream();

 

How can I solve this issue?

 

Thanks,

Yash

 

Outcomes