Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does HHH000387 Hibernate warning mean?

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?

like image 700
stevemac Avatar asked Jan 04 '12 05:01

stevemac


2 Answers

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.
like image 121
Mikko Maunu Avatar answered Nov 13 '22 15:11

Mikko Maunu


Looking at the source for the JdbcResourceRegistryImpl class that throws this error, I personally think having it log at WARN level is excessive; it should be INFO at most, unless there's a way to have all Statements implicitly registered as part of a Hibernate/framework configuration.

It's not clear to me why a Statement should be registered, but if it's only a concern of the inner workings of Hibernate then routinely warning API users about it is a bug, right?

like image 25
spume Avatar answered Nov 13 '22 15:11

spume