Project: Birt
Bug 234294 Datasource statement close should call before connection close
Reported: 2008-05-27 23:34:37 | Status: closed fixed

Description: In DataEngineImpl, the shutdownListener shutdown the connection and close the statement first and then the datasource's statement is closed. It will cause the exception below: Build number: 2.3.0.v20080528-0630 Error log: java.sql.SQLException: Invalid state, the CallableStatement object is closed. at org.eclipse.birt.report.data.oda.jdbc.CallStatement.getMoreResults(CallStatement.java:1711) at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaAdvancedQuery.getMoreResults(OdaAdvancedQuery.java:206) at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement$SequentialResultSetHandler.getMoreResults(PreparedStatement.java:4878) at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.getMoreResults(PreparedStatement.java:742) at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.flushResultSets(PreparedStatement.java:929) at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.close(PreparedStatement.java:900) at org.eclipse.birt.data.engine.executor.DataSource.close(DataSource.java:354) at org.eclipse.birt.data.engine.impl.DataSourceRuntime.closeOdiDataSource(DataSourceRuntime.java:238) at org.eclipse.birt.data.engine.impl.DataEngineImpl.closeDataSource(DataEngineImpl.java:480) at org.eclipse.birt.data.engine.impl.DataEngineImpl.shutdown(DataEngineImpl.java:567) at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.shutdown(DataRequestSessionImpl.java:366) at org.eclipse.birt.report.designer.data.ui.util.DataSetProvider.getColumns(DataSetProvider.java:160) at org.eclipse.birt.report.designer.data.ui.dataset.DataSetEditor$ItemModelManager.getCurrentItemModel(DataSetEditor.java:938) at org.eclipse.birt.report.designer.data.ui.dataset.DataSetEditor.getCurrentItemModel(DataSetEditor.java:501) at org.eclipse.birt.report.designer.data.ui.dataset.ResultSetPreviewPage.executeProcess(ResultSetPreviewPage.java:352) at org.eclipse.birt.report.designer.data.ui.dataset.ResultSetPreviewPage.runUpdateResults(ResultSetPreviewPage.java:297) at org.eclipse.birt.report.designer.data.ui.dataset.ResultSetPreviewPage.access$1(ResultSetPreviewPage.java:260) at org.eclipse.birt.report.designer.data.ui.dataset.ResultSetPreviewPage$4.runInUIThread(ResultSetPreviewPage.java:253)

Files changed in fix:
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/DataEngineImpl.java