Dashbuilder not closing ResultSets and Statements leading to ORA-01000 error

Solution In Progress - Updated -

Issue

We have registered an advanced custom query in our BPMS instance, and the datasource used by business-central is configured with:

   <track-statements>true</track-statements>

This leads to the following WARN message to be logged repeatedly:

WARN  [org.jboss.jca.adapters.jdbc.WrappedConnection] Closing a statement you left open, please do your own housekeeping: java.lang.Throwable: STACKTRACE
    at org.jboss.jca.adapters.jdbc.WrappedConnection.registerStatement(WrappedConnection.java:1716)
    at org.jboss.jca.adapters.jdbc.WrappedStatement.<init>(WrappedStatement.java:105)
    at org.jboss.jca.adapters.jdbc.jdk6.WrappedStatementJDK6.<init>(WrappedStatementJDK6.java:51)
    at org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6.wrapStatement(WrappedConnectionJDK6.java:67)
    at org.jboss.jca.adapters.jdbc.WrappedConnection.createStatement(WrappedConnection.java:305)
    at org.dashbuilder.dataprovider.sql.JDBCUtils.executeQuery(JDBCUtils.java:77) [dashbuilder-dataset-sql-0.5.0.Final-redhat-3.jar:0.5.0.Final-redhat-3]
    at org.dashbuilder.dataprovider.sql.model.Select.fetchCount(Select.java:173) [dashbuilder-dataset-sql-0.5.0.Final-redhat-3.jar:0.5.0.Final-redhat-3]
    at org.dashbuilder.dataprovider.sql.SQLDataSetProvider._getRowCount(SQLDataSetProvider.java:436) [dashbuilder-dataset-sql-0.5.0.Final-redhat-3.jar:0.5.0.Final-redhat-3]
    at org.dashbuilder.dataprovider.sql.SQLDataSetProvider._getDataSetMetadata(SQLDataSetProvider.java:381) [dashbuilder-dataset-sql-0.5.0.Final-redhat-3.jar:0.5.0.Final-redhat-3]
    at org.dashbuilder.dataprovider.sql.SQLDataSetProvider$LookupProcessor.run(SQLDataSetProvider.java:636) [dashbuilder-dataset-sql-0.5.0.Final-redhat-3.jar:0.5.0.Final-redhat-3]
    at org.dashbuilder.dataprovider.sql.SQLDataSetProvider._lookupDataSet(SQLDataSetProvider.java:441) [dashbuilder-dataset-sql-0.5.0.Final-redhat-3.jar:0.5.0.Final-redhat-3]
    at org.dashbuilder.dataprovider.sql.SQLDataSetProvider.lookupDataSet(SQLDataSetProvider.java:235) [dashbuilder-dataset-sql-0.5.0.Final-redhat-3.jar:0.5.0.Final-redhat-3]
    at org.dashbuilder.dataset.DataSetManagerImpl.lookupDataSet(DataSetManagerImpl.java:153) [dashbuilder-dataset-core-0.5.0.Final-redhat-3.jar:0.5.0.Final-redhat-3]
    at org.jbpm.kie.services.impl.query.QueryServiceImpl.query(QueryServiceImpl.java:202) [jbpm-kie-services-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
    at org.jbpm.kie.services.impl.query.QueryServiceImpl.query(QueryServiceImpl.java:170) [jbpm-kie-services-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
    at org.kie.server.services.jbpm.QueryDataServiceBase.query(QueryDataServiceBase.java:110) [kie-server-services-jbpm-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
    at org.kie.server.remote.rest.jbpm.QueryDataResource.runQuery(QueryDataResource.java:164) [kie-server-rest-jbpm-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]
    at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source) [:1.8.0_111]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_111]
    at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_111]

In our production environment, we are using Oracle database for persistence, and track-statements is set to false. After some time, we are seeing the following errors from the database:

14:55:58,211 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 7) SQL Error: 1000, SQLState: 72000
14:55:58,211 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 7) ORA-01000: maximum open cursors exceeded
14:55:58,211 WARN  [org.jbpm.shared.services.impl.TransactionalCommandService] (EJB default - 7) Could not commit session: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not extract ResultSet

Both issues indicate that a ResultSet or a Statement is not properly closed.

Environment

  • Red Hat JBoss BPM Suite
    • 6.4.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In