In this post, I will explain how to fix memory overflow (StackOverflowError exception) error that occurs server start or ant updatesystem.
This issue may occur on local development of SAP Commerce (Hybris). It can easily be fixed by a configuration change.
Steps to fix
- Go to local.properties file
- find the line starts with
tomcat.generaloptionsorstandalone.javaoptions. You can set JVM configs by these properties. - Increase -Xmx JVM property. If it doesn’t exist in the config, you can set it as around 4 GB.
-Xmx4G
To apply changes run in the terminal, in hybris folder
ant server
Start the server again and test. If changing JVM parameter doesn’t fix the issue, try increasing -Xmx config to higher numbers. If still it doesn’t solve your issue, that means it relates to another reason.
What is -Xmx for?
It is a JVM config. It sets max heap memory. To set min heap memory you can use -Xms.
Please see the details.