In our production environment we periodically(and often) have some exceptions like:
It happens only on distributed env with cluster-wide load. It happens not only private field/class keys, but on package-private class too. We use OldCacheKeyImplementation due to HHH-10287.
Now we fix`em through public modifiers addition, but it seems that this is bug in hibernate-core – earlier hibernate never paid attention on access modifiers of mapped field or class.
May be this bug not catched because OldCacheKeyImplementation used rarely.
We already jumped onto WF 10.1.0.Final/hibernate 5.0.10, but not yet on production. It seems that this not fixed on this environment too
Looks like fix is simple – add field.setAccessible call to GetterFieldImpl#get:
but may be I don`t understand something? GetterMethodImpl#get have no setAccessible call, but it works (no any IllegalAccessException with GetterMethodImpl in stack). OldCacheKeyImplementation and infinispan in stack also confusing me.
OldCacheKeyImplementation used (see HHH-10287)
@Embeddable component key used
distributed entity cache: invalidation-cache
distributed timestamps cache: replicated-cache