Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2018-03-22 11:512018-03-28 18:10
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q2
StatusclosedFix in branchFixed in SCM revision8e91e721e8fa
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseOracleJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0038195: too many ORA open cursors when reading DB model

DescriptionWhen dbsm reads DB model using Oracle, both while updating and exporting database. Too many cursors and kept open.

This can cause the export/update to fail if there are, for example, around 2K indices and open_cursors is limited to 5K.
Steps To ReproduceUsing Oracle.

* Case 1: failure
  1.1. Add 2K indexes to DB
  2.2. Export database:
 [java] 69991 ERROR - Error while checking the table where the index XXXXX belongs
     [java] java.sql.SQLException: ORA-01000: maximum open cursors exceeded
     [java] at oracle.jdbc.driver.T4CTTIoer.processError(
     [java] at oracle.jdbc.driver.T4CTTIoer.processError(
     [java] at oracle.jdbc.driver.T4C8Oall.processError(
     [java] at oracle.jdbc.driver.T4CTTIfun.receive(
     [java] at oracle.jdbc.driver.T4CTTIfun.doRPC(
     [java] at oracle.jdbc.driver.T4C8Oall.doOALL(
     [java] at oracle.jdbc.driver.T4CPreparedStatement.doOall8(
     [java] at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(
     [java] at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(
     [java] at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
     [java] at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(
     [java] at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(
     [java] at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(
     [java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(
     [java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(
     [java] at
     [java] at
     [java] at$100(
     [java] at$2.fillRow(
     [java] at org.apache.ddlutils.platform.ModelLoaderBase.fillList(
     [java] at
     [java] at org.apache.ddlutils.platform.ModelLoaderBase$17.getRow(
     [java] at org.apache.ddlutils.platform.ModelLoaderBase.readList(
     [java] at org.apache.ddlutils.platform.ModelLoaderBase.readIndexes(

* Case 2: check open cursors without making it fail
  2.1. In a clean pi, export database
  2.2. While exporting monitor number of open cursors with select sql_text, count(*) as "OPEN CURSORS", user_name from v$open_cursor group by sql_text, user_name order by count(*) desc,2;
   -> Check there are a moment where the top 3 open cursors per query reach:

    SELECT comments FROM user_tab_comments WHERE UPPER(table_nam 236
    SELECT comments FROM user_col_comments WHERE UPPER(table_nam 200

Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
hgbot (developer)
2018-03-22 12:07

Repository: erp/devel/dbsm-main
Changeset: 9f30ffa8fee35d78e72e1ceb315a0564b6e9f644
Author: Asier Lostalé <asier.lostale <at>>
Date: Thu Mar 22 11:54:48 2018 +0100
URL: [^]

fixed bug 38195: statement leak when reading DB model

  Many statems where not closed so they remained open till the end of the

M src/org/apache/ddlutils/platform/
M src/org/apache/ddlutils/platform/oracle/
M src/org/apache/ddlutils/platform/oracle/
M src/org/apache/ddlutils/platform/postgresql/
M src/org/openbravo/ddlutils/util/
hgbot (developer)
2018-03-22 12:07

Repository: erp/devel/pi
Changeset: 8e91e721e8fab4f5ad8c82bd75b36b7d5a0f8764
Author: Asier Lostalé <asier.lostale <at>>
Date: Thu Mar 22 11:57:39 2018 +0100
URL: [^]

fixed bug 38195: statement leak when reading DB model

  Many statements where not closed so they remained open till the end of the process.

M src-db/database/lib/dbsourcemanager.jar
hudsonbot (developer)
2018-03-23 21:22

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]
Maturity status: Test
caristu (developer)
2018-03-28 18:10

Code reviewed + tested OK.

- Issue History
Date Modified Username Field Change
2018-03-22 11:51 alostale New Issue
2018-03-22 11:51 alostale Assigned To => platform
2018-03-22 11:51 alostale Modules => Core
2018-03-22 11:51 alostale Triggers an Emergency Pack => No
2018-03-22 11:52 alostale Review Assigned To => caristu
2018-03-22 11:52 alostale Assigned To platform => alostale
2018-03-22 11:52 alostale Tag Attached: Performance
2018-03-22 12:00 alostale Summary too many open ORA open cursors when reading DB model => too many ORA open cursors when reading DB model
2018-03-22 12:07 hgbot Checkin
2018-03-22 12:07 hgbot Note Added: 0103426
2018-03-22 12:07 hgbot Status new => resolved
2018-03-22 12:07 hgbot Resolution open => fixed
2018-03-22 12:07 hgbot Fixed in SCM revision => [^]
2018-03-22 12:07 hgbot Checkin
2018-03-22 12:07 hgbot Note Added: 0103427
2018-03-22 12:07 hgbot Fixed in SCM revision [^] => [^]
2018-03-23 21:22 hudsonbot Checkin
2018-03-23 21:22 hudsonbot Note Added: 0103476
2018-03-28 18:10 caristu Note Added: 0103627
2018-03-28 18:10 caristu Status resolved => closed
2018-03-28 18:10 caristu Fixed in Version => 3.0PR18Q2

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker