[infinispan-issues] [JBoss JIRA] (ISPN-10473) Interceptor chain is null for hibernate collection caches
Dan Berindei (Jira)
issues at jboss.org
Fri Jan 17 07:38:02 EST 2020
[ https://issues.redhat.com/browse/ISPN-10473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13951160#comment-13951160 ]
Dan Berindei commented on ISPN-10473:
-------------------------------------
[~rvansa] was 2LC really intended to use a functional map on simple caches, or is this an oversight?
We've changed the simple cache so it no longer registers an {{AsyncInterceptorChain}} component in the registry and that causes the NPE.
But IIRC simple caches weren't supposed to have an interceptor chain, so I don't see how functional maps were supposed to work with them.
> Interceptor chain is null for hibernate collection caches
> ---------------------------------------------------------
>
> Key: ISPN-10473
> URL: https://issues.redhat.com/browse/ISPN-10473
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 9.4.16.Final
> Reporter: Moritz Becker
> Priority: Major
>
> {noformat}
> Caused by: java.lang.NullPointerException
> at org.infinispan.functional.impl.AbstractFunctionalMap.invokeAsync(AbstractFunctionalMap.java:127) ~[infinispan-core-9.4.15.Final.jar:9.4.15.Final]
> at org.infinispan.functional.impl.ReadWriteMapImpl.eval(ReadWriteMapImpl.java:56) ~[infinispan-core-9.4.15.Final.jar:9.4.15.Final]
> at org.infinispan.hibernate.cache.commons.access.NonStrictAccessDelegate.putFromLoad(NonStrictAccessDelegate.java:118) ~[infinispan-hibernate-cache-commons-9.4.15.Final.jar:9.4.15.Final]
> at org.infinispan.hibernate.cache.v53.impl.CollectionDataAccessImpl.putFromLoad(CollectionDataAccessImpl.java:30) ~[infinispan-hibernate-cache-v53-9.4.15.Final.jar:9.4.15.Final]
> at org.hibernate.engine.loading.internal.CollectionLoadContext.addCollectionToCache(CollectionLoadContext.java:390) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:295) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:223) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:196) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:1198) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:1162) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.loader.Loader.processResultSet(Loader.java:1010) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.loader.Loader.doQuery(Loader.java:948) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:340) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.loader.Loader.doList(Loader.java:2689) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.loader.Loader.doList(Loader.java:2672) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2506) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.loader.Loader.list(Loader.java:2501) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:504) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:395) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:220) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1508) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1537) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1505) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> at org.hibernate.query.Query.getResultList(Query.java:135) ~[hibernate-core-5.3.7.Final-ordami.jar:5.3.7.Final]
> {noformat}
> This is because the collection cache is defined as simple cache and {{org.infinispan.factories.InterceptorChainFactory#construct}} returns null if {{configuration.simpleCache()}} is true. As far as I can see, this behavior has changed in 10.x, commit 55682f391d0f6e28dd6be4ab780cb9e62a639fbd where {{EmptyAsyncInterceptorChain.INSTANCE}} is returned in this case.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the infinispan-issues
mailing list