1

I am using Hibernate with Oracle database. Regular calls to stored procedures using EntityManager's createStoredProcedureQuery and calling with procedure.execute().

Everything seems to work fine while I'm debugging and the results are also committed to the database.

Only recently, we set up the Dynatrace troubleshooting framework which detects the errors alongside the Network. So I discovered that there are thousands of org.hibernate.result.NoMoreReturnsException detected in most of my methods that execute the stored procedures.

This is the exception message:

Results have been exhausted

This is the stack trace:

OutputsImpl$CurrentReturnState.buildOutput
Hibernate | org.hibernate.result.internal

    StoredProcedureQueryImpl.execute
    Hibernate | org.hibernate.jpa.internal

I have try-catch blocks all around the code so any exception thrown during execution should be logged but I'm seeing none.

Also, I'm not using the result set in most of them, so the problem seems more general independent of whether the procedure has only input or output as well.

Could anyone advise on where should I seek for the problem or what can I try to solve this?

levangode
  • 406
  • 2
  • 12
  • Sounds like hibernate is using the exception for flow logic handling, i.e. throwing and catching the exception internally. – centic Jul 29 '19 at 18:16

0 Answers0