Project: Birt
Bug 147222 [Regression][Compatibility]Exception while running the old report
Reported: 2006-06-15 01:46:03 | Status: closed fixed

Steps to reproduce: 1.Preview the attached report Actual result: The following items have errors: Table (id = 42): - Cannot execute the statement. SQL statement does not return a ResultSet object. SQL error #1: The exception 'java.lang.ClassCastException: org.apache.derby.impl.sql.execute.SumAggregator' was thrown while evaluating an expression. SQL error #2: Java exception: 'org.apache.derby.impl.sql.execute.SumAggregator: java.lang.ClassCastException'. odaconsumer.CannotExecuteStatement ( 8 time(s) ) detail : org.eclipse.birt.data.engine.core.DataException: Cannot execute the statement.SQL statement does not return a ResultSet object.SQL error #1: The exception 'java.lang.ClassCastException: org.apache.derby.impl.sql.execute.SumAggregator' was thrown while evaluating an expression.SQL error #2: Java exception: 'org.apache.derby.impl.sql.execute.SumAggregator: java.lang.ClassCastException'. at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.execute(PreparedStatement.java:567) at org.eclipse.birt.data.engine.executor.DataSourceQuery.execute(DataSourceQuery.java:472) at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.executeOdiQuery(PreparedOdaDSQuery.java:257) at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:695) at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(ServiceForQueryResults.java:152) at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:158) at org.eclipse.birt.report.engine.data.dte.DteResultSet.<init>(DteResultSet.java:100) at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:121) at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:217) at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1530) at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:61) at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:77) at org.eclipse.birt.report.engine.executor.ReportItemExecutor.execute(ReportItemExecutor.java:139) at org.eclipse.birt.report.engine.executor.ReportItemExecutor.execute(ReportItemExecutor.java:147) at org.eclipse.birt.report.engine.executor.ReportItemExecutor.execute(ReportItemExecutor.java:147) at org.eclipse.birt.report.engine.executor.ReportItemExecutor.execute(ReportItemExecutor.java:147) at org.eclipse.birt.report.engine.executor.ReportItemExecutor.execute(ReportItemExecutor.java:147) at org.eclipse.birt.report.engine.executor.ReportItemExecutor.execute(ReportItemExecutor.java:147) at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:157) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:176) at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(Unknown Source) at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(Unknown Source) at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(Unknown Source) at org.eclipse.birt.report.service.actionhandler.BirtRunAndRenderActionHandler.__execute(Unknown Source) at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(Unknown Source) at org.eclipse.birt.report.presentation.aggregation.layout.EngineFragment.doService(Unknown Source) at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment.service(Unknown Source) at org.eclipse.birt.report.servlet.BirtEngineServlet.__doGet(Unknown Source) at org.eclipse.birt.report.servlet.BaseReportEngineServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.eclipse.tomcat.internal.EclipseErrorReportValve.invoke(EclipseErrorReportValve.java:153) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)Caused by: org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object.SQL error #1: The exception 'java.lang.ClassCastException: org.apache.derby.impl.sql.execute.SumAggregator' was thrown while evaluating an expression.SQL error #2: Java exception: 'org.apache.derby.impl.sql.execute.SumAggregator: java.lang.ClassCastException'. at org.eclipse.birt.report.data.oda.jdbc.Statement.executeQuery(Statement.java:344) at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery.doExecuteQuery(OdaQuery.java:443) at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery.executeQuery(OdaQuery.java:408) at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.execute(PreparedStatement.java:553) ... 62 moreCaused by: SQL Exception: The exception 'java.lang.ClassCastException: org.apache.derby.impl.sql.execute.SumAggregator' was thrown while evaluating an expression. at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source) at org.eclipse.birt.report.data.oda.jdbc.Statement.executeQuery(Statement.java:340) ... 65 more

Files changed in fix:
data/org.eclipse.birt.report.data.oda.sampledb/src/org/eclipse/birt/report/data/oda/sampledb/SampleDBJDBCConnectionFactory.java