Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-8836

Custom region definition causes ISPN000453

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 9.3.0.Final
    • 9.2.0.CR2
    • Hibernate Cache
    • None

    Description

      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

      Attachments

        Activity

          People

            rvansa1@redhat.com Radim Vansa (Inactive)
            anton.zalesky Anton Zalesky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: