cancel
Showing results for 
Search instead for 
Did you mean: 

Java Heap Space Error in Reporting Cockpit

Former Member
0 Kudos

Hello guys,

Hope you could help me on this one. I'm a in hybris , and I'm just working my way on learning this new technology.

Part of the task I need to work on is to create a report using Hybris Reporting Cockpit. After uploading the jrxml file in the reporting cockpit, a "Java Heap Space" dialog box occurred in the reporting cockpit page. All other cockpits are OK (Storefront, HAC, HMC), I can access them, made some changes in them, etc., and it looks like the error is only persisting in the Hybris Reporting Cockpit..

Thinking that this issue might be related to memory issue, I tried to restart the Hybris server and the physical server to see if it will work, but it did not. I also tried to remove the jrxml file I've uploaded by deleting the report on the media folder, and then execute an update on the HAC, but even that step didn't work. I'm still seeing the Java Heap Space dialog box each time I login in the Reporting cockpit. Even the logs didn't show much information, the logs I saw didn;'t have any Java Heap Space logs on the log file.

Please take note that prior to this event, I have tried to create a report using a different jrxml file, and I was able to create a report without these errors being thrown.

Can you please advice me what might be the cause of the issue?

I have here the screenshot of the jrxml.

Thanks!

Jake

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi guys,

My reporting cockpit is now working. The java heap space pop up is no longer appearing on the Reporting Cockpit page and I was able to create and export reports now.

In able for me to fix this issue here's what I did:

  1. Navigated to the media folder where the jasperreport folder is located

  2. Deleted the medias created since the time that the Java Heap Space error occurred (in my local build, the error started last 18 May 2015)

  3. Restarted the Hybris Server afterwards

  4. On startup, logged in to the reporting cockpit and see if dashboard is now accessible.

We're thinking that the reason that the Java Heap Space error is prompting up is that one of the reports previously created might have some bad code inside it, causing the cockpit into some kind of loop.

Thanks for all the help! Really appreciate it! 🙂

Regards, Jake

Former Member
0 Kudos

Ouch. That's the kind of bug most driving you crazy...

Former Member
0 Kudos

Hi Sunil,

Thanks for the response!

Tried to add those but I'm still getting the same Java Heap Space error on the reporting cockpit. In addition to those configurations, I also tried to clear the cache, updated the local properties file, click the garbage collect on the HAC, before adding the said configuration and restarted hybris, but still the error keeps prompting in the dashboard of the reporting cockpit page.

Regards, Jake

Former Member
0 Kudos

Try this tomcat.generaloptions=-Xmx4096M -XX:-UseLoopPredicate -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError -ea -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true -Djava.endorsed.dirs="%CATALINA_HOME%/lib/endorsed" -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Dfile.encoding=UTF-8 -Dlog4j.configuration=log4j_init_tomcat.properties -Djava.util.logging.config.file=jdk_logging.properties -Djava.io.tmpdir="${HYBRIS_TEMP_DIR}"

Former Member
0 Kudos

Did you adjust the tomcat options for java VM in local.properties like this?

 tomcat.generaloptions=-Xmx2G -XX:MaxPermSize=300M -ea -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true -Djava.endorsed.dirs="%CATALINA_HOME%/lib/endorsed" -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Dfile.encoding=UTF-8 -Dlog4j.configuration=log4j_init_tomcat.properties -Djava.util.logging.config.file=jdk_logging.properties -Djava.io.tmpdir="${HYBRIS_TEMP_DIR}"    

Especially this part is important: "-Xmx2G -XX:MaxPermSize=300M"

More info on platform configuration here:

https://wiki.hybris.com/display/release5/Configuration+Properties+Reference

Former Member
0 Kudos

Hi Konrad,

Thanks for the response

Current setup of my JVM for local.properties is: -Xmx2G -XX:MaxPermSize=256M. I even tried to increase its current value to -Xmx4G -XX:MaxPermSize=512M but I'm still getting the Java Heap Space issue on the Reporting cockpit.

Regards, Jake