Community
Participate
Working Groups
We are using BIRT RE 4.2.2 embeded in a Java EE Application running on Weblogic 10.3.6 on top of JRockit JVM and connecting to Oracle 10 Database.From within our application we serve different reports. 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. Thread: "[ACTIVE] ExecuteThread: '0' for" id=32 idx=0x84 tid=21309 lastJavaFrame=0x7fc8139fb1d8 Stack 0: start=0x7fc8139bc000, end=0x7fc8139fe000, guards=0x7fc8139c1000 (ok), forbidden=0x7fc8139bf000 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(JIZ)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) 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. 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. We have been analyzing this bug but no solution is provided and not sur if we are facing the same problem: "Bug 402243 - Birt 4.2.2 does no longer work with oracle-database (ojdbc6)My link" 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? We follow the guidelines when generating the report: // 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();
Downgrading to BIRT RE 3.7.2 it works fine.
We can't stay in BIRT 3.7.2 forever, we are testing this issue with BIRT 4.4.0 and the same crash happends. ¿ Any idea ?
Created attachment 247837 [details] Memory dump char[] > 252 MB
This is a duplicate of bug #407299. Note that using the Oracle 12.1 JDBC driver helps to avoid OutOfMemoryError, because the driver is using a different memory model.