Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: OutOfMemoryError: Java heap space

  1. #1
    Join Date
    Oct 2010
    Posts
    17

    Default OutOfMemoryError: Java heap space

    Hello,

    I'm trying to create ad hoc reports with Pentaho User Console, but this error appears on screen in a first time:"Adhoc WebService. Error 0012 - Failed to generate the report preview.Please check the server log for details of the error". If I try again, crashes the browser: the process earlier started, it's remained suspended.

    I edited the file start-pentaho.sh into biserver-ce directory changing the java values Xms and Xmx, and the I created setenv.sh with the same java value into /biserver-ce/tomcat/bin and also edit catalina.sh.... but the problem is not solved.

    How can I proceed?


    This is part of log file:

    2012-05-17 15:09:16,702 ERROR [org.pentaho.platform.engine.services.solution.SolutionEngine] ab2bfdd1-a020-11e1-91b0-83adbf38e196:SOLUTION-ENGINEreview.xaction: Action Sequence execution failed, see details below
    | Error Time: Thursday, May 17, 2012 3:09:16 PM CEST
    | Session ID: admin
    | Instance Id: ab2bfdd1-a020-11e1-91b0-83adbf38e196
    | Action Sequence: preview.xaction
    | Execution Stack:
    EXECUTING ACTION: report (JFreeReportComponent)
    | Action Class: JFreeReportComponent
    | Action Desc: report
    | Loop Index (1-based): 0
    Stack Tracerg.pentaho.platform.api.engine.ActionExecutionException: RuntimeContext.ERROR_0017 - Esecuzione dell'attività fallita
    at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeComponent(RuntimeContext.java:1308)
    at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeAction(RuntimeContext.java:1262)
    at org.pentaho.platform.engine.services.runtime.RuntimeContext.performActions(RuntimeContext.java:1161)
    at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeLoop(RuntimeContext.java:1105)
    at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeSequence(RuntimeContext.java:987)
    at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeSequence(RuntimeContext.java:897)
    at org.pentaho.platform.engine.services.solution.SolutionEngine.executeInternal(SolutionEngine.java:399)
    at org.pentaho.platform.engine.services.solution.SolutionEngine.execute(SolutionEngine.java:317)
    at org.pentaho.platform.engine.services.solution.SolutionEngine.execute(SolutionEngine.java:202)
    at org.pentaho.platform.web.servlet.AdhocWebService.executeActionSequence(AdhocWebService.java:556)
    at org.pentaho.platform.web.servlet.AdhocWebService.createJFreeReportAsStream(AdhocWebService.java:485)
    at org.pentaho.platform.web.servlet.AdhocWebService.generatePreview(AdhocWebService.java:409)
    at org.pentaho.platform.web.servlet.AdhocWebService.dispatch(AdhocWebService.java:297)
    at org.pentaho.platform.web.servlet.AdhocWebService.doGet(AdhocWebService.java:263)
    at org.pentaho.platform.web.servlet.AdhocWebService.doPost(AdhocWebService.java:337)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.pentaho.platform.web.http.filters.PentahoWebContextFilter.doFilter(PentahoWebContextFilter.java:92)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.pentaho.platform.web.http.filters.PentahoRequestContextFilter.doFilter(PentahoRequestContextFilter.java:84)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
    at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
    at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.pentaho.platform.web.http.security.SecurityStartupFilter.doFilter(SecurityStartupFilter.java:103)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.pentaho.platform.web.http.security.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:169)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.pentaho.platform.web.http.security.HttpSessionReuseDetectionFilter.doFilter(HttpSessionReuseDetectionFilter.java:134)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
    at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.pentaho.platform.web.http.filters.SystemStatusFilter.doFilter(SystemStatusFilter.java:60)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.pentaho.platform.web.http.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:113)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:679)
    Caused by: java.lang.RuntimeException: Base.ERROR_0002 - Esecuzione della componente fallita
    at org.pentaho.platform.engine.services.solution.ComponentBase.execute(ComponentBase.java:477)
    at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeComponent(RuntimeContext.java:1293)
    ... 76 more
    Caused by: java.lang.OutOfMemoryError: Java heap space
    at org.pentaho.reporting.engine.classic.core.util.MemoryStringWriter.ensureSize(MemoryStringWriter.java:106)
    at org.pentaho.reporting.engine.classic.core.util.MemoryStringWriter.write(MemoryStringWriter.java:90)
    at java.io.Writer.write(Writer.java:192)
    at java.io.Writer.write(Writer.java:157)
    at org.pentaho.reporting.libraries.xmlns.writer.XmlWriterSupport.writeTag(XmlWriterSupport.java:647)
    at org.pentaho.reporting.libraries.xmlns.writer.XmlWriter.writeTag(XmlWriter.java:214)
    at org.pentaho.reporting.engine.classic.core.modules.output.table.html.HtmlPrinter.print(HtmlPrinter.java:1518)
    at org.pentaho.reporting.engine.classic.core.modules.output.table.html.AllItemsHtmlPrinter.print(AllItemsHtmlPrinter.java:48)
    at org.pentaho.reporting.engine.classic.core.modules.output.table.html.StreamHtmlOutputProcessor.updateTableContent(StreamHtmlOutputProcessor.java:99)
    at org.pentaho.reporting.engine.classic.core.modules.output.table.base.AbstractTableOutputProcessor.processIterativeContent(AbstractTableOutputProcessor.java:165)
    at org.pentaho.reporting.engine.classic.core.layout.StreamingRenderer.processIncrementalUpdate(StreamingRenderer.java:96)
    at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processPage(AbstractReportProcessor.java:1455)
    at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.processReport(AbstractReportProcessor.java:1541)
    at org.pentaho.platform.plugin.action.jfreereport.JFreeReportComponent.writeHtml(JFreeReportComponent.java:1061)
    at org.pentaho.platform.plugin.action.jfreereport.JFreeReportComponent.writeReport(JFreeReportComponent.java:976)
    at org.pentaho.platform.plugin.action.jfreereport.JFreeReportComponent.generateReport(JFreeReportComponent.java:925)
    at org.pentaho.platform.plugin.action.jfreereport.JFreeReportComponent.executeReportAction(JFreeReportComponent.java:315)
    at org.pentaho.platform.plugin.action.jfreereport.JFreeReportComponent.executeAction(JFreeReportComponent.java:303)
    at org.pentaho.platform.engine.services.solution.ComponentBase.execute(ComponentBase.java:463)
    at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeComponent(RuntimeContext.java:1293)
    at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeAction(RuntimeContext.java:1262)
    at org.pentaho.platform.engine.services.runtime.RuntimeContext.performActions(RuntimeContext.java:1161)
    at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeLoop(RuntimeContext.java:1105)
    at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeSequence(RuntimeContext.java:987)
    at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeSequence(RuntimeContext.java:897)
    at org.pentaho.platform.engine.services.solution.SolutionEngine.executeInternal(SolutionEngine.java:399)
    at org.pentaho.platform.engine.services.solution.SolutionEngine.execute(SolutionEngine.java:317)
    at org.pentaho.platform.engine.services.solution.SolutionEngine.execute(SolutionEngine.java:202)
    at org.pentaho.platform.web.servlet.AdhocWebService.executeActionSequence(AdhocWebService.java:556)
    at org.pentaho.platform.web.servlet.AdhocWebService.createJFreeReportAsStream(AdhocWebService.java:485)
    at org.pentaho.platform.web.servlet.AdhocWebService.generatePreview(AdhocWebService.java:409)
    at org.pentaho.platform.web.servlet.AdhocWebService.dispatch(AdhocWebService.java:297)

    Thanks

    Nadia

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    In that case I wonder: How much data do you try to print? We do stream to a temporary memory buffer by default, which is usually fine for any report visible on screen.

    Why? The buffer will at maximum have a size of 20 to 30 MB, usually less (like 1 or 2 MB). If you have 20MB of HTML, your browser usually dies while trying to display such a large document - browsers are not meant to display large amounts of data.

    Pentaho Reporting can be configured to do full streaming, and some of our clients make use of that. Such reports are usually a requirement for banks, who have to archive all transactions that happens on a given day. These reports are never viewed in a browser, they just exist so that they can be stored savely in case the government wants to see the data. Humans do not use these reports.

    So if you have a report that has more than .. hmm .. 20.000 rows of data, then let me ask: Who is going to read that stuff?
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3
    Join Date
    Oct 2010
    Posts
    17

    Default

    Thanks for the reply, unfortunately there are customers who go in search of the weirdest things.

    Nadia

  4. #4
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Via "File->Configuration" in the section "output-table-html": Configure your report to "Force Buffered Writing = false", "External-styles = false" and "Inline-styles = true". One the Master-Report element, in the attributes, scroll down to "Pentaho" and set the "staging-mode" to "Thru".

    This lets the report stream directly to the browser.

    If you are brave enough to query that report in the browser, prepare for nice crashes. Your browser will not be able to render that file. The only sensible option is to use automated programs like "wget" to stream the output directly to disk.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.