[infinispan-issues] [JBoss JIRA] (ISPN-10473) Interceptor chain is null for hibernate collection caches

Moritz Becker (Jira) issues at jboss.org
Sun Aug 11 06:58:49 EDT 2019


Moritz Becker created ISPN-10473:
------------------------------------

             Summary: Interceptor chain is null for hibernate collection caches
                 Key: ISPN-10473
                 URL: https://issues.jboss.org/browse/ISPN-10473
             Project: Infinispan
          Issue Type: Bug
    Affects Versions: 9.4.16.Final
            Reporter: Moritz Becker


{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.12.1#712002)


More information about the infinispan-issues mailing list