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

Potential concurrency issues when retrieving a cache concurrently (for the first time)

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 5.0.0.BETA2
    • 4.2.1.FINAL, 5.0.0.BETA1
    • Core
    • None

      My code initialize the CacheManager but retrieve the cache only "on demand". Several threads do access cacheManager.getCache(namedCache); concurrently.

      I am experiencing the following exceptions

      Caused by: org.infinispan.config.ConfigurationException: Component factory class org.infinispan.factories.EmptyConstructorFactory incorrectly registered! Debug stack: null
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.getFactory(AbstractComponentRegistry.java:365)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:317)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:254)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:843)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:228)
           [java] 	at org.infinispan.factories.ComponentRegistry.registerComponent(ComponentRegistry.java:131)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:185)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:326)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:254)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:843)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:228)
           [java] 	at org.infinispan.factories.ComponentRegistry.registerComponent(ComponentRegistry.java:133)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:185)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:326)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:254)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:843)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:228)
           [java] 	at org.infinispan.factories.ComponentRegistry.registerComponent(ComponentRegistry.java:133)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:185)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:326)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:254)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:843)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:228)
           [java] 	at org.infinispan.factories.ComponentRegistry.registerComponent(ComponentRegistry.java:133)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:185)
           [java] 	at org.infinispan.factories.InternalCacheFactory.bootstrap(InternalCacheFactory.java:102)
           [java] 	at org.infinispan.factories.InternalCacheFactory.createAndWire(InternalCacheFactory.java:77)
           [java] 	at org.infinispan.factories.InternalCacheFactory.createCache(InternalCacheFactory.java:61)
           [java] 	at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:538)
           [java] 	at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:443)
           [java] 	at org.hibernate.ogm.metadata.GridMetadataManagerHelper.getEntityCache(GridMetadataManagerHelper.java:68)
           [java] 	at org.hibernate.ogm.metadata.GridMetadataManagerHelper.getEntityCache(GridMetadataManagerHelper.java:63)
      

      As well as rarely

           [java] Caused by: java.util.ConcurrentModificationException
           [java] 	at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
           [java] 	at java.util.AbstractList$Itr.next(AbstractList.java:343)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:843)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:228)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:185)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:326)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:254)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:843)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:228)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:185)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:326)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:254)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:843)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:228)
           [java] 	at org.infinispan.factories.ComponentRegistry.registerComponent(ComponentRegistry.java:131)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:185)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:326)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:254)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:843)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:228)
           [java] 	at org.infinispan.factories.ComponentRegistry.registerComponent(ComponentRegistry.java:133)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:185)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:326)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:254)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:843)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:228)
           [java] 	at org.infinispan.factories.ComponentRegistry.registerComponent(ComponentRegistry.java:133)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:185)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:326)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:254)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:843)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:228)
           [java] 	at org.infinispan.factories.ComponentRegistry.registerComponent(ComponentRegistry.java:133)
           [java] 	at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:185)
           [java] 	at org.infinispan.factories.InternalCacheFactory.bootstrap(InternalCacheFactory.java:102)
           [java] 	at org.infinispan.factories.InternalCacheFactory.createAndWire(InternalCacheFactory.java:77)
           [java] 	at org.infinispan.factories.InternalCacheFactory.createCache(InternalCacheFactory.java:61)
           [java] 	at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:538)
           [java] 	at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:443)
           [java] 	at org.hibernate.ogm.metadata.GridMetadataManagerHelper.getIdentifierCache(GridMetadataManagerHelper.java:74)
      

              dberinde@redhat.com Dan Berindei (Inactive)
              rhn-engineering-ebernard Emmanuel Bernard
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: