I am getting this error when I am iterating through a ResultSet. I make no other calls to the db while this is running but after a certain number of loops the result inexplicitly closes.

 

My code is as follows:

 

While (resultSet.next()) {

 

int eKey = resultSet.getInt("event_id");

Event event = loadEventMap.get(eKey);

if (event == null) {

                        event = new Event();

                        event.getEventSources().clear();

                        loadEventMap.put(eKey, event);

                       

                        event.setPrimaryKey(eKey);

                        event.setUuid(UUID.fromString(resultSet.getString(CONST_EVENT_UUID)));

                        event.setName(resultSet.getString(CONST_SUMMARY));

                        event.setContent(resultSet.getString(CONST_CONTENT));

                        event.setDescription(resultSet.getString(CONST_DESCRIPTION));

 

..........

 

// Continues adding fields from the query to the event object until ...

 

...........

 

eventSource.setEventLastSyncronized(resultSet.getDate("event_last_synchronized"));

                        eventSource.setSourceString(resultSet.getString("event_source"));

                        eventSource.setVisibility(Visibility.values()[resultSet.getInt("visibility")]);

                        eventSource.setTransparency(Transparency.values()[resultSet.getInt("transparency")]);

                        event.getEventSources().add(eventSource);

                  }

 

 

 

}

 

The problem is consistant in that it happens on the same query at the same record but there is now data issues as when I run the query using squirrel it return all rows successfully

 

 

Thanks for any advice,

 

Mike


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.8.13/840 - Release Date: 6/8/2007 3:15 PM