Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » 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 16:39 Go to next message
Brian Gaugler is currently offline Brian GauglerFriend
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 14:26 Go to previous messageGo to next message
Brian Gaugler is currently offline Brian GauglerFriend
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 19:15]

Report message to a moderator

Re: Exception when ResultSet is empty [message #1371868 is a reply to message #1339121] Wed, 21 May 2014 15:21 Go to previous messageGo to next message
Kristopher Clark is currently offline Kristopher ClarkFriend
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.
Re: Exception when ResultSet is empty [message #1712012 is a reply to message #1371868] Tue, 20 October 2015 17:54 Go to previous messageGo to next message
Kevin Rahe is currently offline Kevin RaheFriend
Messages: 3
Registered: October 2015
Junior Member
I have also been encountering this issue with BIRT 4.3.2 and DB2 LUW 10.5.x, though oddly it doesn't seem predictable, and tends to happen more often when the application is accessing the server via a VPN connection through the Internet than it does when the client is on the server's LAN. I am going to try BIRT 4.5.0 and see if it corrects the problem.
Re: Exception when ResultSet is empty [message #1712025 is a reply to message #1712012] Tue, 20 October 2015 20:24 Go to previous message
Kevin Rahe is currently offline Kevin RaheFriend
Messages: 3
Registered: October 2015
Junior Member
Unfortunately BIRT 4.5.0 still exhibits the same problem.

I, however, am experiencing this issue even when the Data Set on which my Data Cube is based returns results, not merely when it's empty. Replacing the Cross Tab with a Table avoids the error, as it did for you. I haven't added any aggregations to it, but I suspect it will continue to work fine even if I do so. The biggest hurdle for me is that my Data Cube contains numerous derived measures, which are going to be a project in themselves to duplicate in a Table.
Previous Topic:org.eclipse.birt.report.engine.executor.ApplicationClassLoader Memory Leak
Next Topic:How to link two reports
Goto Forum:
  


Current Time: Fri Apr 19 13:06:42 GMT 2024

Powered by FUDForum. Page generated in 0.01812 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top