Mike Zhao (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNTZhYmMzZDkz...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16684?atlOrigin=eyJpIjoiNTZhYm...
) HHH-16684 (
https://hibernate.atlassian.net/browse/HHH-16684?atlOrigin=eyJpIjoiNTZhYm...
) Query cache with entities having enums and custom converter throws SerializerException (
https://hibernate.atlassian.net/browse/HHH-16684?atlOrigin=eyJpIjoiNTZhYm...
)
Issue Type: Bug Affects Versions: 5.6.15 Assignee: Unassigned Components: hibernate-jcache
Created: 24/May/2023 03:00 AM Environment: JDK Temurin 17.0.4, Mac OS X, Oracle 19.3.0.0,
Hibernate 5.6.15.Final, Spring Boot JPA 2.7.12 Priority: Major Reporter: Mike Zhao (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Caching query results in a spring JPA repository using query-hint, hibernate throws
SerializerException when the entity involved has Enum field and a customer converter. In
org.hibernate.cache.spi.QueryKey there is a field
org.hibernate.transform.CacheableResultTransformer which is not transient. It seems like
this field is causing the exception.
ehcach.xml
<config xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xmlns= "http://www.ehcache.org/v3"
xmlns:jsr107 = "http://www.ehcache.org/v3/jsr107"
xsi:schemaLocation="
http://www.ehcache.org/v3 http://www.ehcache.org/schema/ehcache-core-3.0.xsd
http://www.ehcache.org/v3/jsr107
http://www.ehcache.org/schema/ehcache-107-ext-3.0.xsd">
<service>
<jsr107:defaults enable-management= "true" enable-statistics=
"true" />
</service>
<!-- cache eternal unless updated, i.e. no TTL from cache manager itself -->
<cache-template name= "simple" >
<expiry>
<none/>
</expiry>
<heap unit= "entries" > 1000 </heap>
</cache-template>
<cache alias= "org.hibernate.cache.internal.StandardQueryCache"
uses-template= "simple" />
<cache alias= "org.hibernate.cache.spi.TimestampsCache" uses-template=
"simple" />
</config>
(
https://hibernate.atlassian.net/browse/HHH-16684#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16684#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#100225- sha1:2b972a1 )