Hibernate seems to make 2 strange behaviours:
it lookups a wrong class name (a simple entity alias, or a package)
it does it on a closed ClassLoader
This seems to have no functional impact because the program works fine but however it seems to impact the performances significantly.
Here is what I see in the logs (it appears many times):
As you can see above, there is a lookup on ch.astorm.entities which is the package where my entities resides. Sometimes I just get p or p.eventPK (my entity has a composite primary key).
My query looks like this:
The warning comes back regularly (is seems to depend on the number of entities).
You'll find attached a simple testcase that reproduces the problem.
Thanks & Best regards.
OpenJDK 1.8, Glassfish 4.1.1, MySQL 5.7.16
This issue can be closed, because it has been splitted in two: and HHH-11246.