[
https://issues.jboss.org/browse/ISPN-5854?page=com.atlassian.jira.plugin....
]
Radim Vansa commented on ISPN-5854:
-----------------------------------
This is a Hibernate bug, so you should raise JIRA in
https://hibernate.atlassian.net
rather than for Infinispan.
You say that you use the same cache for multiple entities - although you configure single
'entities' cache, this becomes rather a template configuration for the caches
which are per-entity-hierarchy. Do you really share the cache for different entities?
Could you attach your persistence.xml and infinispan config to the JIRA?
It is possible to create the PutFromLoadValidator twice for the same cache only when you
have two different regions mapped to the same cache, which is not a legal configuration.
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
Assignee: Galder ZamarreƱo
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)