tags:

views:

35

answers:

1

I have a Java application that uses a Statement to execute a query that should return about 100,000 records. I iterate over the ResultSet, calling the next method to retrieve each record. The number of records I receive varies from one execution to another. No exception is thrown, the next method simply returns null.

What could explain this behavior?

A: 

Taking a shot in the dark: are you somehow handling/access the same ResultSet from multiple threads at once? Symptoms certainly sound like a synchronization issue might be at play.

matt b