Thomas Heigl (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYzliMGViYjFm...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16001?atlOrigin=eyJpIjoiYzliMG...
) HHH-16001 (
https://hibernate.atlassian.net/browse/HHH-16001?atlOrigin=eyJpIjoiYzliMG...
) CacheKeyImplementation is not serializable for some types (
https://hibernate.atlassian.net/browse/HHH-16001?atlOrigin=eyJpIjoiYzliMG...
)
Issue Type: Bug Affects Versions: 5.6.14 Assignee: Unassigned Components: hibernate-core
Created: 07/Jan/2023 02:38 AM Priority: Major Reporter: Thomas Heigl (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
This was originally reported to as a bug (
https://github.com/EsotericSoftware/kryo/issues/934 ) to my project, but I think that this
is something that has to be resolved in Hibernate itself.
CacheKeyImplementation implements Serializable, but cache keys for some types have fields
that are not serializable. See the following stacktrace:
Caused by: org.hibernate.cache.CacheException: com.esotericsoftware.kryo.KryoException:
java.lang.reflect.InaccessibleObjectException: Unable to make field private transient
volatile boolean java.lang.reflect.Executable.hasRealParameterData accessible: module
java.base does not "opens java.lang.reflect" to unnamed module @2c13da15
Serialization trace:
getterMethod (org.hibernate.property.access.spi.GetterFieldImpl)
getters (org.hibernate.tuple.component.PojoComponentTuplizer)
componentTuplizer (org.hibernate.type.EmbeddedComponentType)
type (org.hibernate.cache.internal.CacheKeyImplementation)
at org.redisson.hibernate.RedissonStorage.evictData(RedissonStorage.java:183)
at
org.hibernate.cache.spi.support.StorageAccess.removeFromCache(StorageAccess.java:35)
at
org.hibernate.cache.spi.support.AbstractCachedDomainDataAccess.remove(AbstractCachedDomainDataAccess.java:91)
at org.hibernate.action.internal.CollectionAction.evict(CollectionAction.java:140)
at
org.hibernate.action.internal.CollectionRecreateAction.execute(CollectionRecreateAction.java:52)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
at
org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475)
at
org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:344)
at
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40)
at
org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1407)
... 4 more
Cache keys for org.hibernate.type.EmbeddedComponentType contain a reference to
java.lang.reflect.Field via org.hibernate.tuple.component.PojoComponentTuplizer.
Classes in java.lang.reflect are not serializable.
This issue has been resolved in Hibernate 6 where cache keys no longer reference the type
itself, but the disassembled state of the type.
Does it make sense to backport the changes from to cache keys from Hibernate 6 to 5?
(
https://hibernate.atlassian.net/browse/HHH-16001#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16001#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100213- sha1:f908df2 )