]
Nistor Adrian updated ISPN-11856:
---------------------------------
Status: Pull Request Sent (was: Coding In Progress)
Git Pull Request:
IllegalLifecycleStateException during manager stop with query in
classpath
--------------------------------------------------------------------------
Key: ISPN-11856
URL:
https://issues.redhat.com/browse/ISPN-11856
Project: Infinispan
Issue Type: Bug
Components: Embedded Querying
Affects Versions: 11.0.0.Dev05
Reporter: Dan Berindei
Assignee: Nistor Adrian
Priority: Major
Fix For: 11.0.0.CR1
When the {{query-core}} module is in the classpath, the {{QueryCache}} component is
registered in the global component registry, but if there query is not used, the actual
query cache is never created.
Then during manager stop,
{{org.infinispan.query.core.impl.LifecycleManager.cacheStopped}} tries to remove cached
queries for every stopped cache, because even non-indexed caches can have cached queries.
But the query cache has not been created, and trying to create it fails with an
{{IllegalLifecycleStateException}}.
{noformat}
11:13:33,390 ERROR (testng-Test) [ComponentRegistry] ISPN000538: Error stopping module
org.infinispan.query.impl.LifecycleManager:defaultcache
org.infinispan.commons.IllegalLifecycleStateException: Cache container has been stopped
and cannot be reused. Recreate the cache container.
at
org.infinispan.manager.DefaultCacheManager.assertIsNotTerminated(DefaultCacheManager.java:1092)
~[classes/:?]
at
org.infinispan.manager.DefaultCacheManager.doDefineConfiguration(DefaultCacheManager.java:438)
~[classes/:?]
at
org.infinispan.manager.DefaultCacheManager.defineConfiguration(DefaultCacheManager.java:418)
~[classes/:?]
at
org.infinispan.security.actions.DefineConfigurationAction.run(DefineConfigurationAction.java:28)
~[classes/:?]
at
org.infinispan.security.actions.DefineConfigurationAction.run(DefineConfigurationAction.java:14)
~[classes/:?]
at org.infinispan.security.Security.doPrivileged(Security.java:51) ~[classes/:?]
at
org.infinispan.registry.impl.SecurityActions.defineConfiguration(SecurityActions.java:30)
~[classes/:?]
at
org.infinispan.registry.impl.InternalCacheRegistryImpl.registerInternalCache(InternalCacheRegistryImpl.java:82)
~[classes/:?]
at org.infinispan.query.core.impl.QueryCache.getCache(QueryCache.java:102)
~[classes/:?]
at org.infinispan.query.core.impl.QueryCache.clear(QueryCache.java:86) ~[classes/:?]
at org.infinispan.query.impl.LifecycleManager.cacheStopped(LifecycleManager.java:337)
~[classes/:?]
at org.infinispan.factories.ComponentRegistry.postStop(ComponentRegistry.java:252)
~[classes/:?]
at
org.infinispan.factories.AbstractComponentRegistry.stop(AbstractComponentRegistry.java:297)
~[classes/:?]
at org.infinispan.cache.impl.CacheImpl.performImmediateShutdown(CacheImpl.java:1096)
~[classes/:?]
at org.infinispan.cache.impl.CacheImpl.stop(CacheImpl.java:1061) ~[classes/:?]
at
org.infinispan.cache.impl.AbstractDelegatingCache.stop(AbstractDelegatingCache.java:521)
~[classes/:?]
at org.infinispan.manager.DefaultCacheManager.terminate(DefaultCacheManager.java:803)
~[classes/:?]
at org.infinispan.manager.DefaultCacheManager.stopCaches(DefaultCacheManager.java:859)
~[classes/:?]
at org.infinispan.manager.DefaultCacheManager.internalStop(DefaultCacheManager.java:835)
~[classes/:?]
at org.infinispan.manager.DefaultCacheManager.stop(DefaultCacheManager.java:811)
~[classes/:?]
{noformat}