JP (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ebc14d...
) *commented* on HHH-13503 (
https://hibernate.atlassian.net/browse/HHH-13503?atlOrigin=eyJpIjoiMThjZD...
)
Re: EhCache Java11 (
https://hibernate.atlassian.net/browse/HHH-13503?atlOrigin=eyJpIjoiMThjZD...
)
I have encountered the same issue using java 8, hibernate 5.4.15 and EhCache 3.8.1 as a
second level cache.
I've tracked it down by activating the sun.io.serialization.extendedDebugInfo
property, which gives the SerializationTrace.txt (
https://hibernate.atlassian.net/secure/attachment/49683/49683_Serializati... )
attached
In short, here's what I found:
* The result query cache doesn't work with queries using named parameters on fields
which are typed using a javax.persistence.Convert converter
* This is because the the resolved type which is stored inside
org.hibernate.cache.spi.QueryKey is an instance of
org.hibernate.type.descriptor.converter.AttributeConverterSqlTypeDescriptorAdapter which
is not serializable.
* When the key is then stored inside EhCache, it throws the NotSerializableException
I'm reasonably certain that this is not a regression, but something that surfaced when
moving to EhCache 3 (never had any issues with EhCache 2)
What I do for now is to disable the result cache for these queries, but I have no real
solutions. Any ideas?
(
https://hibernate.atlassian.net/browse/HHH-13503#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-13503#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#100126- sha1:dd08494 )