Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
hgromek
Contributor
Contributor

java.lang.OutOfMemoryError: Java heap space

I have been getting this error often with the past few jobs I have created. I am attempting to simply use a database input to an excel file. It seems like every time I use an advanced Excel output (updating file and not creating new file). 

 

Here's my Job (my other ones are very similar), this one only brings in 20K records. 

 

I have increased the memory for this job and enabled stream but did not fix the issue. 

 

I have attached an image of my Job - 

 

Here's the Java Error 

Starting job SpaceHeap at 11:46 26/06/2020.

[statistics] connecting to socket on port 3824
[statistics] connected
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.getNodeObject(Unknown Source)
at com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl.synchronizeData(Unknown Source)
at com.sun.org.apache.xerces.internal.dom.ElementNSImpl.getNamespaceURI(Unknown Source)
at org.apache.xmlbeans.impl.store.Locale.loadNode(Locale.java:1420)
at org.apache.xmlbeans.impl.store.Locale.loadNodeChildren(Locale.java:1403)
at org.apache.xmlbeans.impl.store.Locale.loadNode(Locale.java:1445)
at org.apache.xmlbeans.impl.store.Locale.loadNodeChildren(Locale.java:1403)
at org.apache.xmlbeans.impl.store.Locale.loadNode(Locale.java:1445)
at org.apache.xmlbeans.impl.store.Locale.loadNodeChildren(Locale.java:1403)
at org.apache.xmlbeans.impl.store.Locale.loadNode(Locale.java:1445)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1385)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1370)
at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:370)
[statistics] disconnected
at org.apache.poi.POIXMLTypeLoader.parse(POIXMLTypeLoader.java:164)
at org.openxmlformats.schemas.spreadsheetml.x2006.main.WorksheetDocument$Factory.parse(Unknown Source)
at org.apache.poi.xssf.usermodel.XSSFSheet.read(XSSFSheet.java:226)
at org.apache.poi.xssf.usermodel.XSSFSheet.onDocumentRead(XSSFSheet.java:218)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.parseSheet(XSSFWorkbook.java:443)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.onDocumentRead(XSSFWorkbook.java:408)
at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:169)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:300)
at de.jlo.talendcomp.excel.SpreadsheetFile.initializeWorkbook(SpreadsheetFile.java:447)
at demo.spaceheap_0_1.SpaceHeap.tFileExcelWorkbookOpen_1Process(SpaceHeap.java:1141)
at demo.spaceheap_0_1.SpaceHeap.runJobInTOS(SpaceHeap.java:2162)
at demo.spaceheap_0_1.SpaceHeap.main(SpaceHeap.java:2019)
Job SpaceHeap ended at 11:46 26/06/2020. [exit code=1]

Labels (3)
19 Replies
hgromek
Contributor
Contributor
Author

If I increase the jvm size to this the below - I get this error. 4096M can't be handled by my machine. 

0683p000009MaXr.png0683p000009MaWV.png

manodwhb
Champion II
Champion II

@hgromek , you need to increase to more. but you need to have hardware too.

manodwhb
Champion II
Champion II

@hgromek , you need to increase to more. but you need to have hardware too.

hgromek
Contributor
Contributor
Author

I am working with a 8 GB, 64-bit machine. I thought I would be able to use the below, but I always get errors? 

-vmargs
-Xms1024m
-Xmx4096m
-XX:MaxPermSize=512m
-Dfile.encoding=UTF-8

ho 

hgromek
Contributor
Contributor
Author

I am working with a 8 GB, 64-bit machine. I thought I would be able to use the below, but I always get errors? 

-vmargs
-Xms1024m
-Xmx4096m
-XX:MaxPermSize=512m
-Dfile.encoding=UTF-8

ho 

hgromek
Contributor
Contributor
Author

Any other suggestions? I get the error a lot more often now, on datasets only 16K rows?

hgromek
Contributor
Contributor
Author

Hey - Following up.

 

My Machine has the capabilities to run -Xmx4096m but Talend errors out. Also, memory error comes when I use FileOutputExcel to append data to existing file. Running it while just creating new file works fine.

hgromek
Contributor
Contributor
Author

The link has not worked. If I added more RAM to my machine, would that increase the memory power?

hgromek
Contributor
Contributor
Author

If I added more RAM to this machine from 8- 12GB. Would that increase memory available?

Anonymous
Not applicable

@Hallie Gromek​, make sure you have installed the right java for your machine, if it is a 64-bit machine, you should install 64-bit Java.

Refer to this KB article to learn more about this error, all open applications will access and use RAM, go to check how much memory available before you configure the JVM parameters.

 

Regards

Shong