[
https://issues.jboss.org/browse/ISPN-1051?page=com.atlassian.jira.plugin....
]
Galder Zamarreño commented on ISPN-1051:
----------------------------------------
Hmmm, interesting. We already have a test for concurrent getCache() calls in
https://github.com/infinispan/infinispan/blob/master/core/src/test/java/o...
Potential concurrency issues when retrieving a cache concurrently
(for the first time)
--------------------------------------------------------------------------------------
Key: ISPN-1051
URL:
https://issues.jboss.org/browse/ISPN-1051
Project: Infinispan
Issue Type: Bug
Components: Core API
Affects Versions: 4.2.1.FINAL
Reporter: Emmanuel Bernard
Assignee: Dan Berindei
Priority: Critical
Fix For: 4.2.2.BETA1
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
{code}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)
{code}
As well as rarely
{code} [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)
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira