Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Java Heap Size

Former Member
0 Likes
864
  • SAP Managed Tags

Hi,

I am trying to run one script, but getting error as below

cordev04: /usr/sap/D3M/interfaces/ArticleNumberGenerator/javascheduler/src : ./mdmeanjobscheduler.sh

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

        at com.sap.mdm.internal.valuetypes.TupleValueImpl.setFieldValue(TupleValueImpl.java:179)

        at com.sap.mdm.internal.data.RecordLoader.convertToTupleValue(RecordLoader.java:454)

        at com.sap.mdm.internal.data.RecordLoader.convertToTupleValue(RecordLoader.java:411)

        at com.sap.mdm.internal.data.RecordLoader.getFieldData(RecordLoader.java:248)

        at com.sap.mdm.internal.data.RecordImpl.loadData(RecordImpl.java:675)

        at com.sap.mdm.internal.data.RecordsLoader.<init>(RecordsLoader.java:156)

        at com.sap.mdm.internal.data.RecordsLoader.<init>(RecordsLoader.java:49)

        at com.sap.mdm.internal.data.RecordResultSetHelper.convertFrom(RecordResultSetHelper.java:32)

        at com.sap.mdm.data.commands.RetrieveLimitedRecordsCommand.executeImpl(RetrieveLimitedRecordsCommand.java:190)

        at com.sap.mdm.commands.AbstractCommandBase.execute(AbstractCommandBase.java:129)

        at MDMUtil.fetchMDMRecords(MDMUtil.java:322)

        at ArticleAndEANGenerator.main(ArticleAndEANGenerator.java:181)

Please advise how to increase Java Heap Size. It Development system for MDM, OS is Unix.

Please also advise how to check Java Heap Size.

Thanks & Regards,

Aman

2 REPLIES 2
Read only

S_Sriram
Active Contributor
0 Likes
534
  • SAP Managed Tags

Hi Aman

Could you refer the SAP KBA for the error message "Exception in thread "main" java.lang.OutOfMemoryError: Java heap space "

1229267 - Exception in thread "main" java.lang.OutOfMemoryError: Java heap space , when running comm...

BR

SS

Read only

former_member198633
Contributor
0 Likes
534
  • SAP Managed Tags

Hello Aman,

The OutOfMemory error was generated by the MDM application according to the error.

First I would like to recommend this note: 1289240 - How to deal with out of memory errors which explains the OOO errors in general. Maybe the issue is due to a memory leak, which will not be solved by simply increasing the heap size.

Anyway, the heap size can be increased in the Config tool -> click on the instance -> VM Parameters -> Memory tab -> set the initialHeapSize and the maxHeapSize to the desired (and same) value.

Best Regards,

Peter