Skip to content

SAP Commerce (Hybris) memory StackOverflowError exception error on ant updatesystem or server start

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

  1. Go to local.properties file
  2. find the line starts with tomcat.generaloptions or standalone.javaoptions. You can set JVM configs by these properties.
  3. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *