What does HHH000387 Hibernate warning mean?

stevemac picture stevemac · Jan 4, 2012 · Viewed 13k times · Source

I have just updated to Hibernate 4.0 and am seeing the warning message :

HHH000387: ResultSet's statement was not registered

in my log files. What does this mean, and should I be worried?

Answer

Mikko Maunu picture Mikko Maunu · May 6, 2012

I would not worry too much. In any case it looks like it is not in API's users hands to avoid this message. Logging is done in the org.hibernate.engine.jdbc.internal.JdbcResourceRegistryImpl. According documentation:

The main function of a JdbcResourceRegistry is to make sure resources get cleaned up.

Short look to the code tells, that such a message is logged in two situations:

  1. ResultSet is registered via register-method, and statement is not registered.
  2. ResultSet is released via release-method and statement is not registered.