Java heap Space Error

Description
wistubap
Posts: 8
Joined: Wed Aug 18, 2010 8:57 am

Java heap Space Error

Postby wistubap » Wed Aug 18, 2010 9:09 am

Hello,
currently I'm evaluating Polarion - I got the following problem.
When i try to export one of my modules to PDF, I get this error:

Code: Select all

Detailed information:

        Error number 0 in 11: Uncaught exception
Wrapped Exception: Java heap space
com.xpn.xwiki.XWikiException: Error number 0 in 11: Uncaught exception
Wrapped Exception: Java heap space
   at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:271)
   at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:118)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at com.polarion.portal.tomcat.servlets.DoAsFilter$1.run(DoAsFilter.java:65)
   at java.security.AccessController.doPrivileged(Native Method)
   at javax.security.auth.Subject.doAs(Subject.java:396)
   at com.polarion.portal.tomcat.servlets.DoAsFilter.doFilter(DoAsFilter.java:63)
   at com.polarion.wiki.auth.WikiDoAsFilter.doFilter(WikiDoAsFilter.java:16)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at com.polarion.portal.tomcat.servlets.ExpiresFilter.doFilter(ExpiresFilter.java:30)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:579)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:440)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:155)
   at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
   at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
   at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:744)
   at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:674)
   at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:866)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:619)


Wrapped Exception:

java.lang.OutOfMemoryError: Java heap space
   at java.util.Arrays.copyOf(Arrays.java:2882)
   at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
   at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
   at java.lang.StringBuilder.append(StringBuilder.java:119)
   at com.xpn.xwiki.pdf.impl.PdfExportImpl.prepareImages(PdfExportImpl.java:1552)
   at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXMLFO(PdfExportImpl.java:280)
   at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXHtml(PdfExportImpl.java:238)
   at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportHtml(PdfExportImpl.java:838)
   at com.xpn.xwiki.pdf.impl.PdfExportImpl.createFoFile(PdfExportImpl.java:998)
   at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportToPDF(PdfExportImpl.java:868)
   at com.xpn.xwiki.web.PDFAction.render(PDFAction.java:40)
   at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:201)
   at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:118)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at com.polarion.portal.tomcat.servlets.DoAsFilter$1.run(DoAsFilter.java:65)
   at java.security.AccessController.doPrivileged(Native Method)
   at javax.security.auth.Subject.doAs(Subject.java:396)
   at com.polarion.portal.tomcat.servlets.DoAsFilter.doFilter(DoAsFilter.java:63)
   at com.polarion.wiki.auth.WikiDoAsFilter.doFilter(WikiDoAsFilter.java:16)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at com.polarion.portal.tomcat.servlets.ExpiresFilter.doFilter(ExpiresFilter.java:30)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   


Is there any configuration to avoid this error?

Thanks in advance,
Peter Wistuba

jandlj
Posts: 20
Joined: Mon Aug 23, 2010 11:40 am
Location: Polarion Software, Prague
Contact:

Re: Java heap Space Error

Postby jandlj » Mon Aug 23, 2010 11:49 am

Hi,
you've probably ran out of memory. Please try to increase java heap space in config.sh file.

edit the file :
Linux : $POLARION_HOME/etc/config.sh (usually: /opt/polarion/etc/config.sh)
Windows : [POLARION]\polarion\polarion.ini

export PSVN_JServer_opt="-server
-Xms256m
-Xmx600m
-XX:PermSize=128m
-XX:MaxPermSize=128m
..

the value -Xmx means maximum java heap space, you can increase it to value bigger than 1500m on 64bit systems. Java32 can allocate the heap memory just 1.5GB! Therefore we recommend to use Java64.

Warning: Take care, the system needs some memory for itself and JVM has some overhead too. For 4GB physical RAM is appropriate value -Xmx2500m, for 8GB physical RAM -Xmx6000m … necessary to monitor and avoid the swapping.

the parameter -Xms is initial heap size (memory allocated immediately after JVM start).

You need to restart Polarion after these changes.

Best Regards,
Jiri Jandl
Polarion Support Team
Last edited by jandlj on Tue Aug 24, 2010 12:55 pm, edited 1 time in total.

wistubap
Posts: 8
Joined: Wed Aug 18, 2010 8:57 am

Re: Java heap Space Error

Postby wistubap » Tue Aug 24, 2010 6:00 am

Hi,
thanks for the hints - I changed the settings in polarion.ini (this was the only location whre I could find the XMX) to:
-Xms512m
-Xmx1500m
After that I ran the service.bat and restartet the computer - still not working!
The problem is polarion runs on a 32bit machine, therefore i can not increase the max. java heap space!
Is there any other solution to solve that problem?

Thanks in advance,
Peter

jandlj
Posts: 20
Joined: Mon Aug 23, 2010 11:40 am
Location: Polarion Software, Prague
Contact:

Re: Java heap Space Error

Postby jandlj » Tue Aug 24, 2010 12:43 pm

I'm afraid that there is no other solution.
If you are working with such a big module, you probably need to adapt your hardware/OS.

We can offer you some pre-sales services. I've sent your request to our Sales department. They will contact you.

Best Regards,
Jiri Jandl
Polarion Support Team


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 6 guests