Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » BirtViewer - ok, Birt API - OutOfMemory(Need memory consumption explanation)
BirtViewer - ok, Birt API - OutOfMemory [message #1125426] Fri, 04 October 2013 09:54 Go to next message
ILya Cyclone is currently offline ILya Cyclone
Messages: 19
Registered: June 2013
Junior Member
Hello.
I have Birt Web application (BirtViewer, if I'm not mistaken) installed on my Weblogic server.
I can access reports by URL. That is fine.

Actually I only need to generated PDF, so I try to use Birt API (without viewer).
According to this example I create and deploy a servlet with all those JARs under WEB-INF/lib.

When I try to access this servlet it falls down with:
java.lang.OutOfMemoryError: allocLargeObjectOrArray: [C, size 1073741840

My questions are:
1. Is it really trying to allocate ~1Gb size object? What is it?
2. Why BirtViewer is generating the same report on the same server with no errors?
3. What memory consumption should I expect when it comes to generating large reports?

Thanks.
Birt 4.3, WebLogic 10.3.5


[app:BirtTestServlet module:BirtTestServlet.war path:/birtservlet spec-version:2.5]] Root cause of ServletException.
java.lang.OutOfMemoryError: allocLargeObjectOrArray: [C, size 1073741840
	at java.lang.reflect.Array.newArray(Native Method)
	at java.lang.reflect.Array.newInstance(Array.java:52)
	at oracle.jdbc.driver.BufferCache.get(BufferCache.java:229)
	at oracle.jdbc.driver.PhysicalConnection.getCharBuffer(PhysicalConnection.java:12333)

[Updated on: Fri, 04 October 2013 10:35]

Report message to a moderator

Re: BirtViewer - ok, Birt API - OutOfMemory [message #1128062 is a reply to message #1125426] Mon, 07 October 2013 05:45 Go to previous messageGo to next message
ILya Cyclone is currently offline ILya Cyclone
Messages: 19
Registered: June 2013
Junior Member
Anybody here at all?
Re: BirtViewer - ok, Birt API - OutOfMemory [message #1129072 is a reply to message #1128062] Tue, 08 October 2013 04:58 Go to previous messageGo to next message
donino donino is currently offline donino donino
Messages: 162
Registered: July 2011
Senior Member
The main difference between the example you mentionned and the WebViewer, is by default the WebViewer is processing a report in two tasks:
- Run task => Generating a rptdocument
- Render task => Generating an output from a rptdocument

In your example, we make use of a single task:

IRunAndRenderTask task = birtReportEngine.createRunAndRenderTask( design );

Try to replace this with two tasks: IRunTask and IRenderTask, as described here


Re: BirtViewer - ok, Birt API - OutOfMemory [message #1401357 is a reply to message #1129072] Tue, 15 July 2014 09:32 Go to previous messageGo to next message
ILya Cyclone is currently offline ILya Cyclone
Messages: 19
Registered: June 2013
Junior Member
Tried separating into two tasks. No result.

I still experience this issue. After weblogic reboot this report generation works normally some time, then falls to OutOfMemory.
At the same time other reports are generated by the same application without visible issues.
What is this Gigabyte BIRT is trying to allocate??? I rechecked that no SQL is querying any big data. Only short strings, couple of rows in 3 data sets.
The report contains just one page and quite few data strings. No clobs or anything.

Stacktrace.
ru.miit.reportservice.birt.BirtEngineClient.generateReport(BirtEngineClient.java:174) - my application calling task.run();
Can I at least find out what SQL is it executing?
java.lang.OutOfMemoryError: allocLargeObjectOrArray: [C, size 1073741840
	at java.lang.reflect.Array.newInstance(Array.java:52)
	at oracle.jdbc.driver.BufferCache.get(BufferCache.java:229)
	at oracle.jdbc.driver.PhysicalConnection.getCharBuffer(PhysicalConnection.java:12333)
	at oracle.jdbc.driver.OracleStatement.prepareAccessors(OracleStatement.java:1112)
	at oracle.jdbc.driver.T4CTTIdcb.receiveCommon(T4CTTIdcb.java:283)
	at oracle.jdbc.driver.T4CTTIdcb.receive(T4CTTIdcb.java:150)
	at oracle.jdbc.driver.T4C8Oall.readDCB(T4C8Oall.java:895)
	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:389)
	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
	at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:947)
	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1283)
	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1441)
	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
	at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3823)
	at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1671)
	at org.eclipse.birt.report.data.oda.jdbc.Statement.executeQuery(Statement.java:477)
	at org.eclipse.birt.report.data.oda.jdbc.Statement.getMetaUsingPolicy1(Statement.java:420)
	at org.eclipse.birt.report.data.oda.jdbc.Statement.getMetaData(Statement.java:316)
	at org.eclipse.birt.report.data.oda.jdbc.bidi.BidiStatement.getMetaData(BidiStatement.java:56)
	at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery.doGetMetaData(OdaQuery.java:423)
	at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery.getMetaData(OdaQuery.java:390)
	at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.getRuntimeMetaData(PreparedStatement.java:407)
	at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.getProjectedColumns(PreparedStatement.java:377)
	at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.doGetMetaData(PreparedStatement.java:347)
	at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.getMetaData(PreparedStatement.java:334)
	at org.eclipse.birt.data.engine.executor.DataSourceQuery.getMetaData(DataSourceQuery.java:455)
	at org.eclipse.birt.data.engine.executor.DataSourceQuery.prepare(DataSourceQuery.java:370)
	at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.prepareOdiQuery(PreparedOdaDSQuery.java:517)
	at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:346)
	at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:463)
	at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190)
	at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:178)
	at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(PreparedOdaDSQuery.java:178)
	at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:637)
	at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:152)
	at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:275)
	at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1947)
	at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)
	at org.eclipse.birt.report.engine.executor.DataItemExecutor.execute(DataItemExecutor.java:75)
	at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
	at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
	at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
	at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
	at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
	at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
	at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111)
	at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160)
	at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
	at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
	at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
	at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26)
	at org.eclipse.birt.report.engine.layout.html.HTMLRepeatHeaderLM.layoutChildren(HTMLRepeatHeaderLM.java:46)
	at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:140)
	at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70)
	at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
	at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
	at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:181)
	at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
	at ru.miit.reportservice.birt.BirtEngineClient.generateReport(BirtEngineClient.java:174)
	at ru.miit.reportservice.birt.servlet.ReportServlet.doGet(ReportServlet.java:86)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
	at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
	at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
	at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
	at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
	at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
	at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
	at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
	at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
	at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
	at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
	at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
	at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
	at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
	at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
	at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

[Updated on: Tue, 15 July 2014 09:49]

Report message to a moderator

Re: BirtViewer - ok, Birt API - OutOfMemory [message #1401864 is a reply to message #1401357] Wed, 16 July 2014 03:26 Go to previous messageGo to next message
Henning von Bargen is currently offline Henning von Bargen
Messages: 21
Registered: May 2011
Junior Member
You might be hitting bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=407299 : OutOfMemoryError when creating a new JDBC DataSet with many VARCHAR(4096) columns, as of BIRT 4.2.2.

This bug is so damn simple to fix and still not fixed Crying or Very Sad

In the previewer, the number of rows is usually limited to 500.

If you are using BIRT multi-threaded, take into account that the failing report is not necessarily the root cause! Another report executing at the same time could have eaten up almost all memory; then your report could fail when it tries to allocate a few hundred bytes (I had this situation once).
Re: BirtViewer - ok, Birt API - OutOfMemory [message #1402005 is a reply to message #1401864] Wed, 16 July 2014 07:19 Go to previous messageGo to next message
ILya Cyclone is currently offline ILya Cyclone
Messages: 19
Registered: June 2013
Junior Member
Hello, Henning.
Many thanks for your attention.
That bug makes entire BIRT completely unusable, isn't it?

About multi-threading: I'll have this in mind, but this is not the case. The size of allocating large object is always the same (when server comes into some state which makes this problem reproducible) and exception is thrown exactly when I hit F5 in a browser.

Do you have any information about this bug status in version 4.4.0?
Re: BirtViewer - ok, Birt API - OutOfMemory [message #1402008 is a reply to message #1401864] Wed, 16 July 2014 07:21 Go to previous messageGo to next message
ILya Cyclone is currently offline ILya Cyclone
Messages: 19
Registered: June 2013
Junior Member
ugh
Something bad just happened to this forum.

[Updated on: Wed, 16 July 2014 10:23]

Report message to a moderator

Re: BirtViewer - ok, Birt API - OutOfMemory [message #1402009 is a reply to message #1401864] Wed, 16 July 2014 07:22 Go to previous messageGo to next message
ILya Cyclone is currently offline ILya Cyclone
Messages: 19
Registered: June 2013
Junior Member
del

[Updated on: Wed, 16 July 2014 10:24]

Report message to a moderator

Re: BirtViewer - ok, Birt API - OutOfMemory [message #1402012 is a reply to message #1401864] Wed, 16 July 2014 07:25 Go to previous messageGo to next message
ILya Cyclone is currently offline ILya Cyclone
Messages: 19
Registered: June 2013
Junior Member
del

[Updated on: Wed, 16 July 2014 10:24]

Report message to a moderator

Re: BirtViewer - ok, Birt API - OutOfMemory [message #1402013 is a reply to message #1401864] Wed, 16 July 2014 07:28 Go to previous message
ILya Cyclone is currently offline ILya Cyclone
Messages: 19
Registered: June 2013
Junior Member
del

[Updated on: Wed, 16 July 2014 10:22]

Report message to a moderator

Previous Topic:'Needs cache for data engine' default in Kepler? report very slow.
Next Topic:Birt 4.3.2 calendar date parameter
Goto Forum:
  


Current Time: Fri Jul 25 21:22:39 EDT 2014

Powered by FUDForum. Page generated in 0.01778 seconds