| 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:
entityManager.createQuery("SELECT p FROM Event p WHERE p.eventstart<=?1 AND p.eventend>=?2")
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. |