]
Radim Vansa updated ISPN-8836:
------------------------------
Status: Open (was: New)
Custom region definition causes ISPN000453
------------------------------------------
Key: ISPN-8836
URL:
https://issues.jboss.org/browse/ISPN-8836
Project: Infinispan
Issue Type: Bug
Components: Hibernate Cache
Affects Versions: 9.2.0.CR2
Environment: Hibernate 5.2.13 SpringFramework 5.0.2.RELEASE
Reporter: Anton Zalesky
Assignee: Radim Vansa
Priority: Critical
I have entity with defined region
@Entity
@Table(name = "Dashboard")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "dashboard")
public class Dashboard {..}
And I have infinispan.xml with custom configuration for region
<local-cache name="dashboard" simple-cache="true"
statistics="true" statistics-available="true">
<transaction mode="NONE" />
<expiration max-idle="14400000" />
<memory>
<object size="10000"/>
</memory>
</local-cache>
On start I get the following exception
org.infinispan.commons.CacheConfigurationException: ISPN000453: Attempt to define
configuration for cache dashboard which already exists
at
org.infinispan.manager.DefaultCacheManager.doDefineConfiguration(DefaultCacheManager.java:370)
at
org.infinispan.manager.DefaultCacheManager.defineConfiguration(DefaultCacheManager.java:342)
at
org.infinispan.hibernate.cache.commons.InfinispanRegionFactory.getCache(InfinispanRegionFactory.java:692)
at
org.infinispan.hibernate.cache.commons.InfinispanRegionFactory.buildEntityRegion(InfinispanRegionFactory.java:332)
at org.hibernate.cache.spi.RegionFactory.buildEntityRegion(RegionFactory.java:132)
at
org.hibernate.internal.CacheImpl.determineEntityRegionAccessStrategy(CacheImpl.java:439)
at org.hibernate.metamodel.internal.MetamodelImpl.initialize(MetamodelImpl.java:120)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:300)
at
org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:460)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:710)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:726)
at
org.springframework.orm.hibernate5.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:535)
at
org.springframework.orm.hibernate5.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:519)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1769)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1706)
... 97 more