java.sql.SQLException: Exhausted Resultset, java.lang.NullPointerException

Hi All,

I have a service which fetches some data from Oracle database using JDBC adapter connection, in 4.6 environment.
This service works fine most of the time. But, sometimes it gives errors like
java.lang.NullPointerException or
java.sql.SQLException: Exhausted Resultset
These errors are rare but keep appearing for different services which are similar.
Can anyone please tell what could be the possible reason for these kinds are errors?

Thank you,
–Jay