Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » OutOfMemoryError: Java heap space for Birt viewer
OutOfMemoryError: Java heap space for Birt viewer [message #937823] Tue, 09 October 2012 09:45 Go to next message
suyash patil is currently offline suyash patil
Messages: 2
Registered: September 2012
Junior Member
Hi All,
I'm working on following specs:
1)Apache Tomcat/6.0.35
with environment vars as

JAVA_OPTS=-Xms1024m -Xmx2048m -XX:MaxPermSize=512m


2) Birt 3.7 installed on eclipse (although i used 4.2.1 runtime let me know this is correct or I have find 3.7 runtime)
3) struts2 web app with

<constant name="struts.action.excludePattern" value="/frameset*,/run*,/download*,/parameter*,/document*,/output*,/extract*,/preview*"/>


in struts.xml .

I have some reports containing cross tabs with 2 rows and some 50-70 records, which work fine when run on "strut2 action" class. I have some requirement where the I have to use birt's native viewer.So I had all the config for that purpose into my web-app (Like copying all contents from "WebViewerExample" to my app and appending web.xml etc). I tested these setting by running the test.rptdesign in my app which was successful.
But when I tried to execute my reports then there this exception.

Exception in thread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0" java.lang.OutOfMemoryError: Java heap space
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:375)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:289)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
9 Oct, 2012 11:19:05 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren
SEVERE: Exception invoking periodic operation:
java.lang.OutOfMemoryError: Java heap space
- com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1a84fae -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
- com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@1a84fae -- APPARENT DEADLOCK!!! Complete Status:
Managed Threads: 3
Active Threads: 2
Active Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@fd5609 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1b6c74 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
Pending Tasks:
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6d65fd
Pool thread stack traces:
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,]
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
java.text.MessageFormat.applyPattern(Unknown Source)
java.text.MessageFormat.<init>(Unknown Source)
java.text.MessageFormat.format(Unknown Source)
com.mysql.jdbc.Messages.getString(Messages.java:108)
com.mysql.jdbc.ConnectionPropertiesImpl.<init>(ConnectionPropertiesImpl.java:1690)
com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:683)
com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
java.lang.reflect.Constructor.newInstance(Unknown Source)
com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:375)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:289)
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,main]
com.mysql.jdbc.ResultSetRow.getString(ResultSetRow.java:799)
com.mysql.jdbc.ByteArrayRow.getString(ByteArrayRow.java:72)
com.mysql.jdbc.ResultSetImpl.getStringInternal(ResultSetImpl.java:5699)
com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5576)
com.mysql.jdbc.ConnectionImpl.buildCollationMapping(ConnectionImpl.java:933)
com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3373)
com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2328)
com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2122)
com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:774)
com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
java.lang.reflect.Constructor.newInstance(Unknown Source)
com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:375)
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:289)
com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)





I also tried changing BIRT_VIEWER_CUBE_MEMORY_SIZE to 1024,...

still had same exception thrown


update: the abow error came I used /frameset url pattern.

But I tried to hit same report using /output url pattern. retaining constant BIRT_VIEWER_CUBE_MEMORY_SIZE to 1024
then I got exception.

org.eclipse.birt.data.engine.core.DataException: A report document error occurred when getting the save stream.
The archive file has been closed.
at org.eclipse.birt.data.engine.api.DataEngineContext.getOutputStream(DataEngineContext.java:364)
at org.eclipse.birt.data.engine.impl.DataEngineSession$ReportDocumentShutdownListener.saveNamingRelation(DataEngineSession.java:480)
at org.eclipse.birt.data.engine.impl.DataEngineSession$ReportDocumentShutdownListener.dataEngineShutdown(DataEngineSession.java:460)
at org.eclipse.birt.data.engine.impl.DataEngineImpl.shutdown(DataEngineImpl.java:569)
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.shutdown(DataRequestSessionImpl.java:517)
at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.shutdown(AbstractDataEngine.java:350)
at org.eclipse.birt.report.engine.data.dte.DataGenerationEngine.shutdown(DataGenerationEngine.java:154)
at org.eclipse.birt.report.engine.executor.ExecutionContext.close(ExecutionContext.java:483)
at org.eclipse.birt.report.engine.api.impl.EngineTask.close(EngineTask.java:1613)
at org.eclipse.birt.report.engine.api.impl.RunTask.close(RunTask.java:316)
at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1346)
at org.eclipse.birt.report.service.BirtViewerReportService.runReport(BirtViewerReportService.java:158)
at org.eclipse.birt.report.service.actionhandler.BirtRunReportActionHandler.__execute(BirtRunReportActionHandler.java:81)
at org.eclipse.birt.report.service.actionhandler.BirtGetPageActionHandler.__checkDocumentExists(BirtGetPageActionHandler.java:58)
at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.prepareParameters(AbstractGetPageActionHandler.java:119)
at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.__execute(AbstractGetPageActionHandler.java:104)
at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47)
at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143)
at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPage(BirtDocumentProcessor.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112)
at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:81)
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.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:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: The archive file has been closed.
at org.eclipse.birt.core.archive.compound.ArchiveFile.createEntry(ArchiveFile.java:423)
at org.eclipse.birt.core.archive.compound.ArchiveWriter.openRandomAccessStream(ArchiveWriter.java:69)
at org.eclipse.birt.data.engine.api.DataEngineContext.getOutputStream(DataEngineContext.java:355)
... 61 more

can anyone please help!!!!


Thanks in advance,

Suyash H Patil
Re: OutOfMemoryError: Java heap space for Birt viewer [message #938298 is a reply to message #937823] Tue, 09 October 2012 18:50 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Can you try running the viewer stand alone with no modifications and try the report?

Jason
Previous Topic:Passing sub report totals to expressions
Next Topic:HTML output in DataItem using Java
Goto Forum:
  


Current Time: Thu Oct 23 06:11:43 GMT 2014

Powered by FUDForum. Page generated in 0.01576 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software