i was also getting the same thing when :
i was using the same connection for executing lot of queries, i found out that even if i close the Statement and ResultSet objects
i get the maximum no of open cursers excedeed exception,
after searching through net i found out that even if you close the statements and resultsets oracle
jdbc driver raises this exception.
Solution: simply close the connection and create a new connection after say 100 query executions.