Community
Participate
Working Groups
Created attachment 260680 [details] Exception thrown by BIRT with JDBC trace Hi Not sure if this is an issue in IBM DB2 JDBC Driver or Birt. When creating a new report data source, I add the object and select "Preview Results". I receive the error on lines 87-123 in the attached file. I did a JDBC trace and discovered that Birt was masking the original error. On lines 9-44, you will see the original error. I have a table with a key using BIGINT. The data on line 12, 2015042916572541500, is one of the values. The problem is caused by line 7 - the use of getInt. This should not be used for this field and is causing the error as the data will not fit into an INT. I have a workaround, but really this needs to be addressed. The workaround is to cast the key field as a DECIMAL. "Preview Results" now works with no other changes except the cast. Note the following interesting 'quirk' The exception is NOT THROWN if the FIRST field is not a BIGINT - the BIGINT values are returned as 0 instead. I tried this with multiple IBM JDBC drivers to no avail. Happy to provide more info. Cheers Rob
Comment on attachment 260680 [details] Exception thrown by BIRT with JDBC trace >[jcc][Time:2016-04-01-18:07:00.402][Thread:ModalContext][PreparedStatement@2a593301]executeQuery () returned com.ibm.db2.jcc.t4.h@884f9b33 >[jcc][Thread:ModalContext][SystemMonitor:stop] core: 11.176492ms | network: 1.044268ms | server: 0.598ms [STMT@710488833] >[jcc][SystemMonitor:start] >[jcc][Time:2016-04-01-18:07:00.404][Thread:ModalContext][ResultSet@884f9b33]next () called >[jcc][Time:2016-04-01-18:07:00.404][Thread:ModalContext][ResultSet@884f9b33]next () returned true >[jcc][Thread:ModalContext][SystemMonitor:stop] core: 0.048958999999999996ms | network: 0.0ms | server: 0.0ms [STMT@710488833] >[jcc][Time:2016-04-01-18:07:00.404][Thread:ModalContext][ResultSet@884f9b33]getInt (1) called >[jcc] BEGIN TRACE_DIAGNOSTICS >[jcc][Thread:ModalContext][SQLException@f6ee8092] java.sql.SQLException >[jcc][Thread:ModalContext][SQLException@f6ee8092] SQL state = 42815 >[jcc][Thread:ModalContext][SQLException@f6ee8092] Error code = -4461 >[jcc][Thread:ModalContext][SQLException@f6ee8092] Message = [jcc][10177][11615][3.69.24] Invalid data conversion: Requested conversion would result in a loss of precision of 2015042916572541500. ERRORCODE=-4461, SQLSTATE=42815 >[jcc][Thread:ModalContext][SQLException@f6ee8092] Stack trace follows >com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][10177][11615][3.69.24] Invalid data conversion: Requested conversion would result in a loss of precision of 2015042916572541500. ERRORCODE=-4461, SQLSTATE=42815 > at com.ibm.db2.jcc.am.gd.a(Unknown Source) > at com.ibm.db2.jcc.am.gd.a(Unknown Source) > at com.ibm.db2.jcc.am.gd.a(Unknown Source) > at com.ibm.db2.jcc.am.jc.d(Unknown Source) > at com.ibm.db2.jcc.am.kc.J(Unknown Source) > at com.ibm.db2.jcc.am.ResultSet.getIntX(Unknown Source) > at com.ibm.db2.jcc.am.ResultSet.getInt(Unknown Source) > at org.eclipse.birt.report.data.oda.jdbc.ResultSet.getInt(Unknown Source) > at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaResultSet.getInt(Unknown Source) > at org.eclipse.birt.data.engine.odaconsumer.ResultSet.getInt(Unknown Source) > at org.eclipse.birt.data.engine.odaconsumer.ResultSet.fetch(Unknown Source) > at org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch(Unknown Source) > at org.eclipse.birt.data.engine.executor.cache.RowResultSet.fetch(Unknown Source) > at org.eclipse.birt.data.engine.executor.cache.RowResultSet.doNext(Unknown Source) > at org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(Unknown Source) > at org.eclipse.birt.data.engine.executor.transform.SimpleResultSet$RowResultSetWithResultSetScope.fetch(Unknown Source) > at org.eclipse.birt.data.engine.executor.cache.RowResultSet.doNext(Unknown Source) > at org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(Unknown Source) > at org.eclipse.birt.data.engine.executor.transform.SimpleResultSet.prepareFirstRow(Unknown Source) > at org.eclipse.birt.data.engine.executor.transform.SimpleResultSet.getResultSetIterator(Unknown Source) > at org.eclipse.birt.data.engine.executor.DataSourceQuery.execute(Unknown Source) > at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.executeOdiQuery(Unknown Source) > at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(Unknown Source) > at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(Unknown Source) > at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(Unknown Source) > at org.eclipse.birt.report.engine.api.impl.ExtractionResults.nextResultIterator(Unknown Source) > at org.eclipse.birt.report.designer.data.ui.dataset.DataSetPreviewer.preview(Unknown Source) > at org.eclipse.birt.report.designer.data.ui.dataset.ResultSetPreviewPage$5.run(Unknown Source) > at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(Unknown Source) >[jcc] END TRACE_DIAGNOSTICS >[jcc][Time:2016-04-01-18:07:00.404][Thread:ModalContext][ResultSet@884f9b33]getMetaData () called >[jcc][Time:2016-04-01-18:07:00.404][Thread:ModalContext][ResultSet@884f9b33]getMetaData () returned MetaData@c1d681dc >[jcc][Time:2016-04-01-18:07:00.405][Thread:ModalContext][ResultSet@884f9b33]wasNull () called >[jcc] BEGIN TRACE_DIAGNOSTICS >[jcc][Thread:ModalContext][SQLException@c38e6f1f] java.sql.SQLException >[jcc][Thread:ModalContext][SQLException@c38e6f1f] SQL state = null >[jcc][Thread:ModalContext][SQLException@c38e6f1f] Error code = -4472 >[jcc][Thread:ModalContext][SQLException@c38e6f1f] Message = [jcc][t4][10132][10859][3.69.24] Invalid operation: No data is retrieved for OUT parameter. ERRORCODE=-4472, SQLSTATE=null >[jcc][Thread:ModalContext][SQLException@c38e6f1f] Stack trace follows >com.ibm.db2.jcc.am.SqlException: [jcc][t4][10132][10859][3.69.24] Invalid operation: No data is retrieved for OUT parameter. ERRORCODE=-4472, SQLSTATE=null > at com.ibm.db2.jcc.am.gd.a(Unknown Source) > at com.ibm.db2.jcc.am.gd.a(Unknown Source) > at com.ibm.db2.jcc.am.gd.a(Unknown Source) > at com.ibm.db2.jcc.am.ResultSet.wasNull(Unknown Source) > at org.eclipse.birt.report.data.oda.jdbc.ResultSet.wasNull(Unknown Source) > at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaResultSet.wasNull(Unknown Source) > at org.eclipse.birt.data.engine.odaconsumer.ResultSet.wasNull(Unknown Source) > at org.eclipse.birt.data.engine.odaconsumer.ResultSet.fetch(Unknown Source) > at org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch(Unknown Source) > at org.eclipse.birt.data.engine.executor.cache.RowResultSet.fetch(Unknown Source) > at org.eclipse.birt.data.engine.executor.cache.RowResultSet.doNext(Unknown Source) > at org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(Unknown Source) > at org.eclipse.birt.data.engine.executor.transform.SimpleResultSet$RowResultSetWithResultSetScope.fetch(Unknown Source) > at org.eclipse.birt.data.engine.executor.cache.RowResultSet.doNext(Unknown Source) > at org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(Unknown Source) > at org.eclipse.birt.data.engine.executor.transform.SimpleResultSet.prepareFirstRow(Unknown Source) > at org.eclipse.birt.data.engine.executor.transform.SimpleResultSet.getResultSetIterator(Unknown Source) > at org.eclipse.birt.data.engine.executor.DataSourceQuery.execute(Unknown Source) > at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.executeOdiQuery(Unknown Source) > at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(Unknown Source) > at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(Unknown Source) > at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(Unknown Source) > at org.eclipse.birt.report.engine.api.impl.ExtractionResults.nextResultIterator(Unknown Source) > at org.eclipse.birt.report.designer.data.ui.dataset.DataSetPreviewer.preview(Unknown Source) > at org.eclipse.birt.report.designer.data.ui.dataset.ResultSetPreviewPage$5.run(Unknown Source) > at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(Unknown Source) >[jcc] END TRACE_DIAGNOSTICS org.eclipse.birt.data.engine.odaconsumer.OdaDataException: Cannot determine whether the last retrieved value was null. org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot determine isNull value in the result set. SQL error #1:[jcc][t4][10132][10859][4.19.26] Invalid operation: No data is retrieved for OUT parameter. ERRORCODE=-4472, SQLSTATE=null ; com.ibm.db2.jcc.am.SqlException: [jcc][t4][10132][10859][4.19.26] Invalid operation: No data is retrieved for OUT parameter. ERRORCODE=-4472, SQLSTATE=null at org.eclipse.birt.data.engine.odaconsumer.ExceptionHandler.newException(Unknown Source) at org.eclipse.birt.data.engine.odaconsumer.ExceptionHandler.throwException(Unknown Source) at org.eclipse.birt.data.engine.odaconsumer.ExceptionHandler.throwException(Unknown Source) at org.eclipse.birt.data.engine.odaconsumer.ResultSet.wasNull(Unknown Source) at org.eclipse.birt.data.engine.odaconsumer.ResultSet.fetch(Unknown Source) at org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch(Unknown Source) at org.eclipse.birt.data.engine.executor.cache.RowResultSet.fetch(Unknown Source) at org.eclipse.birt.data.engine.executor.cache.RowResultSet.doNext(Unknown Source) at org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(Unknown Source) at org.eclipse.birt.data.engine.executor.transform.SimpleResultSet$RowResultSetWithResultSetScope.fetch(Unknown Source) at org.eclipse.birt.data.engine.executor.cache.RowResultSet.doNext(Unknown Source) at org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(Unknown Source) at org.eclipse.birt.data.engine.executor.transform.SimpleResultSet.prepareFirstRow(Unknown Source) at org.eclipse.birt.data.engine.executor.transform.SimpleResultSet.getResultSetIterator(Unknown Source) at org.eclipse.birt.data.engine.executor.DataSourceQuery.execute(Unknown Source) at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.executeOdiQuery(Unknown Source) at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(Unknown Source) at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(Unknown Source) at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(Unknown Source) at org.eclipse.birt.report.engine.api.impl.ExtractionResults.nextResultIterator(Unknown Source) at org.eclipse.birt.report.designer.data.ui.dataset.DataSetPreviewer.preview(Unknown Source) at org.eclipse.birt.report.designer.data.ui.dataset.ResultSetPreviewPage$5.run(Unknown Source) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(Unknown Source) Caused by: org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot determine isNull value in the result set. SQL error #1:[jcc][t4][10132][10859][4.19.26] Invalid operation: No data is retrieved for OUT parameter. ERRORCODE=-4472, SQLSTATE=null ; com.ibm.db2.jcc.am.SqlException: [jcc][t4][10132][10859][4.19.26] Invalid operation: No data is retrieved for OUT parameter. ERRORCODE=-4472, SQLSTATE=null at org.eclipse.birt.report.data.oda.jdbc.ResultSet.wasNull(Unknown Source) at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaResultSet.wasNull(Unknown Source) ... 20 more Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][t4][10132][10859][4.19.26] Invalid operation: No data is retrieved for OUT parameter. ERRORCODE=-4472, SQLSTATE=null at com.ibm.db2.jcc.am.kd.a(Unknown Source) at com.ibm.db2.jcc.am.kd.a(Unknown Source) at com.ibm.db2.jcc.am.kd.a(Unknown Source) at com.ibm.db2.jcc.am.ResultSet.wasNull(Unknown Source) ... 22 more