-
Bug
-
Resolution: Done
-
Major
-
7.2.3.GA
Declared a named cacheable query for an entity and specifying the same region name for both the query and the entity.
@NamedQuery(name = "Employee.findAll", query = "SELECT a FROM Employee a", hints = { @QueryHint(name = "org.hibernate.cacheable", value = "true"), @QueryHint(name = "org.hibernate.cacheRegion", value = "custom-region-01") } ) @Cache(usage = CacheConcurrencyStrategy.READ_ONLY, region="custom-region-01")
When executing the named query the first time, the exception below is raised:
java.lang.ClassCastException: org.infinispan.hibernate.cache.v53.impl.DomainDataRegionImpl cannot be cast to org.hibernate.cache.spi.QueryResultsRegion
at org.hibernate.cache.internal.EnabledCaching.makeQueryResultsRegionAccess(EnabledCaching.java:491)
at org.hibernate.cache.internal.EnabledCaching.getQueryResultsCache(EnabledCaching.java:478)
at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2515)
at org.hibernate.loader.Loader.list(Loader.java:2498)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:504)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:395)
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:220)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1508)
at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1537)
at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1505)
at org.hibernate.query.Query.getResultList(Query.java:132)
at org.jboss.as.jpa.container.QueryNonTxInvocationDetacher.getResultList(QueryNonTxInvocationDetacher.java:58)
- is incorporated by
-
JBEAP-17513 [GSS](7.2.z) Upgrade Hibernate ORM from 5.3.11.SP1 to 5.3.13
- Closed
- incorporates
-
HHH-13586 Loading...
- links to