Hi,<br />
<br />
We are using BIRT RE 4.2.2 embeded in a Java EE Application running on Weblogic 10.3.6 and connecting to Oracle 10 Database.From within our application we serve different reports. <br />
<br />
We start the server instances and request a report generation, X.rptdesign. Everything works fine as long as we request the same report with the same parameters (therefore the same SQL sentence is generated) but if we try to request the same report with different parameters or any other report we immediately get an OutOfMemory in the server.<br />
<br />
Thread:<br />
"[ACTIVE] ExecuteThread: '0' for" id=32 idx=0x84 tid=21309 lastJavaFrame=0x7fc8139fb1d8<br />
Stack 0: start=0x7fc8139bc000, end=0x7fc8139fe000, guards=0x7fc8139c1000 (ok), forbidden=0x7fc8139bf000<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
Thread Stack Trace:
at dumpForceDump+206(dump.c:1143)
@0x7fc8b18d094e
at vmFatalErrorMsgV+107(vmruntime.c:1286)
@0x7fc8b1a8875c
at vmFatalErrorMsg+150(vmruntime.c:1295)
@0x7fc8b1a887f7
at throw_out_of_memory+1395(javaexceptions.c:411)
@0x7fc8b1925aa4
at javaExceptionNewPendingOutOfJavaMemory+159(javaexceptions.c:441)
@0x7fc8b1925d20
at RJNI_jrockit_vm_Allocator_allocLargeObjectOrArray+173(rnimemsystem.c:122)
@0x7fc8b1a37fde
-- Java stack --
at jrockit/vm/Allocator.allocLargeObjectOrArray(****)Ljava/lang/Object;(Native Method)
at jrockit/vm/Allocator.allocObjectOrArray(Allocator.java:349)[inlined]
at jrockit/vm/Allocator.allocArray(Allocator.java:257)[optimized]
at jrockit/vm/Allocator.allocArray(Allocator.java:125)
at java/lang/reflect/Array.newArray(Ljava/lang/Class;I)Ljava/lang/Object;(Native Method)
at java/lang/reflect/Array.newInstance(Array.java:52)
at oracle/jdbc/driver/BufferCache.get(BufferCache.java:226)
at oracle/jdbc/driver/PhysicalConnection.getCharBuffer(PhysicalConnection.java:7643)
at oracle/jdbc/driver/OracleStatement.prepareAccessors(OracleStatement.java:991)
at oracle/jdbc/driver/T4CTTIdcb.receiveCommon(T4CTTIdcb.java:273)
at oracle/jdbc/driver/T4CTTIdcb.receive(T4CTTIdcb.java:144)
at oracle/jdbc/driver/T4C8Oall.readDCB(T4C8Oall.java:806)
at oracle/jdbc/driver/T4CTTIfun.receive(T4CTTIfun.java:355)
at oracle/jdbc/driver/T4CTTIfun.doRPC(T4CTTIfun.java:191)
at oracle/jdbc/driver/T4C8Oall.doOALL(T4C8Oall.java:523)
at oracle/jdbc/driver/T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
at oracle/jdbc/driver/T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:862)
at oracle/jdbc/driver/OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
at oracle/jdbc/driver/OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
at oracle/jdbc/driver/OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
at oracle/jdbc/driver/OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3620)
at oracle/jdbc/driver/OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
at weblogic/jdbc/wrapper/PreparedStatement.executeQuery(PreparedStatement.java:135)
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/datatools/connectivity/oda/consumer/helper/OdaQuery.doGetMetaData(OdaQuery.java:412)
at org/eclipse/datatools/connectivity/oda/consumer/helper/OdaQuery.getMetaData(OdaQuery.java:379)
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.declareCustomColumn(PreparedStatement.java:1223)
at org/eclipse/birt/data/engine/executor/DataSourceQuery.addCustomFields(DataSourceQuery.java:671)
at org/eclipse/birt/data/engine/executor/DataSourceQuery.prepareColumns(DataSourceQuery.java:394)
at org/eclipse/birt/data/engine/executor/DataSourceQuery.prepare(DataSourceQuery.java:332)
at org/eclipse/birt/data/engine/impl/PreparedOdaDSQuery$OdaDSQueryExecutor.prepareOdiQuery(PreparedOdaDSQuery.java:459)
at org/eclipse/birt/data/engine/impl/QueryExecutor.prepareExecution(QueryExecutor.java:346)
at org/eclipse/birt/data/engine/impl/PreparedQuery.doPrepare(PreparedQuery.java:455)
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:153)
at org/eclipse/birt/report/data/adapter/impl/DataRequestSessionImpl.execute(DataRequestSessionImpl.java:634)
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:267)
at org/eclipse/birt/report/engine/executor/ExecutionContext.executeQuery(ExecutionContext.java:1941)
at org/eclipse/birt/report/engine/executor/QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)
at org/eclipse/birt/report/engine/executor/TableItemExecutor.execute(TableItemExecutor.java:62)
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/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)
</pre>
<br />
<br />
Analyzing the memory status at that time we found that very large objects are generated, even 250 MB. We found char[] with a few real data belonging to the query result an filled with nulls or \u0000.<br />
No matter the order in which we try to make these test, the result is always an OutOfMemory with very large objects allocated in memory. <br />
<br />
We have been analyzing this bug but no solution is provided:<br />
<a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=402243'>Bug 402243 - Birt 4.2.2 does no longer work with oracle-database (ojdbc6)My link</a><br />
<br />
Is there any kind of caching system embed in BIRT we are ignoring? Is there any kind of special configuration neeeded when connecting with Oracle Drivers?<br />
<br />
We follow the guidelines when generating the report:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
// We create or reuse the engine if already created
engine = EngineManager.init();
// We create the RunAndRenderTask
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
task.getAppContext().put("PARENT_CLASSLOADER", ReportGenerator.class.getClassLoader());
// we facilitate the connection
// (...)
conn = ds.getConnection();
task.getAppContext().put("OdaJDBCDriverPassInConnection", conn);
task.setParameterValues(params);
(...)
task.run();
(...)
task.close();
</pre>
<br />
Maybe we are not providing the connection the right way ?<br />
<br />
Increasing servers memory would just be a patch, we should get to avoid the generation of such objects in memory.<br />
<br />
We desperately need advice.<br />
<br />
Thank you !