Karl von Randow created ISPN-5854:
-------------------------------------
Summary: NonTxInvalidationInterceptor added twice to cache used for Hibernate
2LC
Key: ISPN-5854
URL:
https://issues.jboss.org/browse/ISPN-5854
Project: Infinispan
Issue Type: Bug
Components: Integration
Affects Versions: 7.2.5.Final
Reporter: Karl von Randow
I use the same Infinispan cache for multiple Hibernate entities. The
{{PutFromLoadValidator}} looks for and replaces the {{InvalidationInterceptor}} the first
time it sees the cache, but the second time it fails to find the
{{InvalidationInterceptor}} and ends up with {{invalidationPosition = 0}} from line 168,
which means it incorrectly removes the first interceptor from the chain and then tries to
add the {{NonTxInvalidationInterceptor}} again, causing the exception below.
Perhaps the {{NonTxInvalidationInterceptor}} should only be added once per cache, or the
{{accessStrategy}} should be cached or something?
{noformat}
org.infinispan.commons.CacheConfigurationException: Detected interceptor of type
[org.hibernate.cache.infinispan.access.NonTxInvalidationInterceptor] being added to the
interceptor chain 170588969 more than once!
at org.infinispan.interceptors.InterceptorChain.assertNotAdded(InterceptorChain.java:76)
at org.infinispan.interceptors.InterceptorChain.addInterceptor(InterceptorChain.java:90)
at org.infinispan.cache.impl.CacheImpl.addInterceptor(CacheImpl.java:883)
at
org.hibernate.cache.infinispan.access.PutFromLoadValidator.<init>(PutFromLoadValidator.java:192)
at
org.hibernate.cache.infinispan.access.PutFromLoadValidator.<init>(PutFromLoadValidator.java:133)
at
org.hibernate.cache.infinispan.impl.BaseTransactionalDataRegion.prepareForValidation(BaseTransactionalDataRegion.java:137)
at
org.hibernate.cache.infinispan.impl.BaseTransactionalDataRegion.createAccessDelegate(BaseTransactionalDataRegion.java:122)
at
org.hibernate.cache.infinispan.collection.CollectionRegionImpl.buildAccessStrategy(CollectionRegionImpl.java:49)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:400)
at
org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444)
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:170)
{noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)