I get the error **java.sql.SQLException: Exhausted ResultSet** to run a query against an Oracle database. The connection is via a connection pool defined in Websphere. The code executed is as follows:

```java
if (rs! = null) (
    while (rs.next ()) (
        count = rs.getInt (1);
    )
)

```

I note that the resultset contains data (rs.next ())

Thanks