TxPutFromLoadInterceptor added to the interceptor chain more than once in JBoss EAP

Solution Unverified - Updated -

Issue

  • During deployment of an application, encountering the exception below

    ... org.infinispan.commons.CacheConfigurationException: Detected interceptor of type [org.hibernate.cache.infinispan.access.TxPutFromLoadInterceptor] being added to the interceptor chain ... more than once!
            at org.infinispan.interceptors.InterceptorChain.assertNotAdded(InterceptorChain.java:75)
            at org.infinispan.interceptors.InterceptorChain.addInterceptor(InterceptorChain.java:89)
            at org.infinispan.cache.impl.CacheImpl.addInterceptor(CacheImpl.java:892)
            at org.infinispan.cache.impl.AbstractDelegatingAdvancedCache.addInterceptor(AbstractDelegatingAdvancedCache.java:65)
            at org.hibernate.cache.infinispan.access.PutFromLoadValidator.addToCache(PutFromLoadValidator.java:204)
            at org.hibernate.cache.infinispan.access.PutFromLoadValidator.<init>(PutFromLoadValidator.java:166)
            at org.hibernate.cache.infinispan.access.PutFromLoadValidator.<init>(PutFromLoadValidator.java:133)
            at org.hibernate.cache.infinispan.impl.BaseTransactionalDataRegion.prepareForValidation(BaseTransactionalDataRegion.java:153)
            at org.hibernate.cache.infinispan.impl.BaseTransactionalDataRegion.createAccessDelegate(BaseTransactionalDataRegion.java:132)
            at org.hibernate.cache.infinispan.entity.EntityRegionImpl.buildAccessStrategy(EntityRegionImpl.java:49)
            at org.hibernate.internal.SessionFactoryImpl.determineEntityRegionAccessStrategy(SessionFactoryImpl.java:648)
            at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:342)
            at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:423)
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:711)
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:727)
            ...
    
  • The application includes multiple persistence units
  • Hibernate is managed by Spring rather than by the EAP container
  • The legacy/pre-JPA (SessionFactory/Session) interface to Hibernate is used by the Spring code to manage Hibernate

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7.1
  • Hibernate 5.1
  • Infinispan 8.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content