Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Exception when ResultSet is empty(Cannot fetch the next data row, org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot move down to next row in the result set. com.ibm.db2.jcc.c.SqlException: Invalid operation: result set clo)
Exception when ResultSet is empty [message #1328326] Fri, 02 May 2014 12:39 Go to next message
Brian Gaugler is currently offline Brian Gaugler
Messages: 5
Registered: May 2014
Junior Member
I am running the BIRT 4.3.2 report engine on an IBM WAS 8.5.5 server.

The reports load fine when there are actually results for the given criteria. I receive the following exception when there are no results:

org.eclipse.birt.data.engine.odaconsumer.ResultSet fetch
SEVERE: Cannot fetch the next data row.
Throwable occurred: org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot move down to next row in the result set.
SQL error #1:Invalid operation: result set closed
com.ibm.db2.jcc.c.SqlException: Invalid operation: result set closed
	at org.eclipse.birt.report.data.oda.jdbc.ResultSet.next(ResultSet.java:198)


I am aware of this topic:

developer.actuate.com/community/forum/index.php?/topic/25148-exception-is-thrown-when-there-is-no-data-retreived-from-query/

Since my report data source simply defines the JDBC class (com.ibm.db2.jcc.DB2Driver) and JNDI URL, it uses the WAS data source. I did try adding the allowNextOnExhaustedResultSet custom property to the data source as an integer value 1, but this did not fix anything for me. This was stated to only be a work-around anyways.

Is there going to be a fix for this? As suggested by IBM- Modify the application code to avoid calling ResultSet.next if there are no records or no more records. This is in the BIRT data engine code, for ResultSet class.

Are there any more work-arounds in the mean time?

It's probably also worth mentioning that this was working without issue in WAS8 for BIRT 4.2.0
Re: Exception when ResultSet is empty [message #1339121 is a reply to message #1328326] Wed, 07 May 2014 10:26 Go to previous messageGo to next message
Brian Gaugler is currently offline Brian Gaugler
Messages: 5
Registered: May 2014
Junior Member
I have traced this issue down to an Aggregation element within a Grid object. With this new BIRT version, if the result set is empty- the Grid element throws the exception described above. There is nothing fancy about it. I deleted it and tried the most basic Aggregation possible-> COUNT(pk_column). Is anyone else experiencing this with the DB2 JDBC? Thanks. (I have replaced the grid with a table, and the aggregates work fine with no result queries)

[Updated on: Wed, 07 May 2014 15:15]

Report message to a moderator

Re: Exception when ResultSet is empty [message #1371868 is a reply to message #1339121] Wed, 21 May 2014 11:21 Go to previous message
Kristopher Clark is currently offline Kristopher Clark
Messages: 130
Registered: January 2013
Senior Member
Brian Gaugler wrote:
> I have traced this issue down to an Aggregation data element. With this
> new BIRT version, if the result set is empty- the aggregation element
> throws the exception described above. There is nothing fancy about it.
> I deleted it and tried the most basic Aggregation possible->
> COUNT(pk_column). Is anyone else experiencing this with the DB2 JDBC?
> Thanks.

Brian,
I haven't tried it yet, but in the onCreate() of your aggregation
could you try to check if it's empty. If it is then assign it a value
like 0 or something. That *might* be one work around for this.
Previous Topic:Preview web viewer
Next Topic:"Find" issue in XML source- page jumping back to top
Goto Forum:
  


Current Time: Wed Aug 20 06:52:16 EDT 2014

Powered by FUDForum. Page generated in 0.01482 seconds