Increase of security cache failed

We keep finding entries “Failed to load the cache in 5 attempts” in the log, for random users which are always changing. It keeps occuring also at times with nearly zero activity, apparently triggered by cyclic backend processes.

According to some hints and links in Failed to load the cache in 5 attempts - flush not working anymore, we tried to increase the security cache ( platform.security.authorization.cache") to 100.000.

We tried to edit /WEB-INF/cache/infinispan/config.xml by inserting the following section

<local-cache-configuration name="platform.security.authorization.cache">
  <memory max-count="100000"/>
</local-cache-configuration>

and then restarting the app. However, it failed to start so we needed to undo this. In the stacktrace the last error entry was “Failed to get cache factory for role hint [infinispan]”. Here is the complete message:

<!DOCTYPE html>
<html lang="es" data-lt-installed="true"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Estado HTTP 500 – Internal Server Error</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>Estado HTTP 500 – Internal Server Error</h1><hr class="line"><p><b>Tipo</b> Informe de Excepción</p><p><b>mensaje</b> Failed to locate an ExtendedURL Resource Type Resolver component</p><p><b>Descripción</b> El servidor encontró un error interno que hizo que no pudiera rellenar este requerimiento.</p><p><b>excepción</b></p><pre>javax.servlet.ServletException: Failed to locate an ExtendedURL Resource Type Resolver component
	org.xwiki.resource.servlet.RoutingFilter.getResourceTypeResolver(RoutingFilter.java:176)
	org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:98)
</pre><p><b>causa raíz</b></p><pre>org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.url.internal.DefaultResourceTypeResolver] identified by type [org.xwiki.resource.ResourceTypeResolver&lt;org.xwiki.url.ExtendedURL&gt;] and hint [null]
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:189)
	org.xwiki.resource.servlet.RoutingFilter.getResourceTypeResolver(RoutingFilter.java:172)
	org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:98)
</pre><p><b>causa raíz</b></p><pre>org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.component.internal.ContextComponentManager] identified by type [interface org.xwiki.component.manager.ComponentManager] and hint [context]
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:189)
	org.xwiki.resource.servlet.RoutingFilter.getResourceTypeResolver(RoutingFilter.java:172)
	org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:98)
</pre><p><b>causa raíz</b></p><pre>org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.component.internal.UserComponentManager] identified by type [interface org.xwiki.component.manager.ComponentManager] and hint [user]
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:189)
	org.xwiki.resource.servlet.RoutingFilter.getResourceTypeResolver(RoutingFilter.java:172)
	org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:98)
</pre><p><b>causa raíz</b></p><pre>org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.component.internal.DocumentComponentManager] identified by type [interface org.xwiki.component.manager.ComponentManager] and hint [document]
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:189)
	org.xwiki.resource.servlet.RoutingFilter.getResourceTypeResolver(RoutingFilter.java:172)
	org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:98)
</pre><p><b>causa raíz</b></p><pre>org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.component.internal.SpaceComponentManager] identified by type [interface org.xwiki.component.manager.ComponentManager] and hint [space]
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:189)
	org.xwiki.resource.servlet.RoutingFilter.getResourceTypeResolver(RoutingFilter.java:172)
	org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:98)
</pre><p><b>causa raíz</b></p><pre>org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.component.internal.WikiComponentManager] identified by type [interface org.xwiki.component.manager.ComponentManager] and hint [wiki]
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:189)
	org.xwiki.resource.servlet.RoutingFilter.getResourceTypeResolver(RoutingFilter.java:172)
	org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:98)
</pre><p><b>causa raíz</b></p><pre>org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.wiki.internal.descriptor.DefaultWikiDescriptorManager] identified by type [interface org.xwiki.wiki.descriptor.WikiDescriptorManager] and hint [default]
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:189)
	org.xwiki.resource.servlet.RoutingFilter.getResourceTypeResolver(RoutingFilter.java:172)
	org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:98)
</pre><p><b>causa raíz</b></p><pre>org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.wiki.internal.manager.WikiDescriptorCache] identified by type [class org.xwiki.wiki.internal.manager.WikiDescriptorCache] and hint [default]
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:189)
	org.xwiki.resource.servlet.RoutingFilter.getResourceTypeResolver(RoutingFilter.java:172)
	org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:98)
</pre><p><b>causa raíz</b></p><pre>org.xwiki.component.phase.InitializationException: Failed to initialize wiki descriptor caches [wiki.descriptor.cache.wikiAlias]
	org.xwiki.wiki.internal.manager.WikiDescriptorCache.createCache(WikiDescriptorCache.java:71)
	org.xwiki.wiki.internal.manager.WikiDescriptorCache.initialize(WikiDescriptorCache.java:59)
	org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:365)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:189)
	org.xwiki.resource.servlet.RoutingFilter.getResourceTypeResolver(RoutingFilter.java:172)
	org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:98)
</pre><p><b>causa raíz</b></p><pre>org.xwiki.cache.CacheException: Failed to get cache factory for role hint [infinispan]
	org.xwiki.cache.internal.DefaultCacheManager.createNewCache(DefaultCacheManager.java:109)
	org.xwiki.cache.internal.DefaultCacheManager.createNewCache(DefaultCacheManager.java:85)
	org.xwiki.wiki.internal.manager.WikiDescriptorCache.createCache(WikiDescriptorCache.java:68)
	org.xwiki.wiki.internal.manager.WikiDescriptorCache.initialize(WikiDescriptorCache.java:59)
	org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:365)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:189)
	org.xwiki.resource.servlet.RoutingFilter.getResourceTypeResolver(RoutingFilter.java:172)
	org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:98)
</pre><p><b>nota</b> La traza completa de la causa de este error se encuentra en los archivos de registro del servidor.</p><hr class="line"><h3>Apache Tomcat/9.0.68</h3></body></html>

Checking Infinispan web sites, we also tried this syntax

<local-cache name="platform.security.authorization.cache" statistics="true">
    <memory max-count="100000"/>
</local-cache>

which also failed.

We are using XWiki 13.10. We have ~ 2K users and are using Google SSO with the OIDC extension, so increasing the cache felt to be the right direction. RAM shouldn’t be a big issue.

Did we do it the wrong way? Do you have other suggestions to try to resolve the “Failed to load” error besides increasing this cache?

You should have a more complete error (especially the latest causa raíz which tell you why it exactly fails) in the application server log.

In XWiki 13.10, it might look more like

     <local-cache-configuration name="platform.security.authorization.cache">
        <memory>
          <object size="100000"/>
        </memory>
     </local-cache-configuration>

Note that AFAIK the security cache conflict problem was fixed in 14.10.20 and the current LTS is 15.10.10 (and there are also a lot of other problems fixed since 13.10) so you might want to consider upgrading.

Yes, unfortunately we run the app on an externally hosted Kubernetes cluster where this log is flushed very often, so anything about the failed attempt is lost already. We’ll try it again based on the syntax you suggested.

We’re aware this should be done at some point but currently I’m reluctant due to our big bunch of custom Velocity / Groovy / JavaScript / REST API custom scripting which I’m afraid of leaving us with weeks / months to fix after an upgrade. But we’ll better do it sooner than later, obviously.

Thanks so far.

Indeed, now we were able to try it again, we found out it was just a syntax error. :neutral_face:

Now we fixed that, the app would start but then arrive at the Distribution Wizard Screen, and we didn’t dare to go further without being sure how, also don’t want to undergo any installation process because the app is already installed and has many subwikis and extensions.

I would suppose that happens because this cache configuration is somehow regarded as part of the app distribution and a change was detected. The server log does not show anything unusual up to this point. Can we just click the wizard away (and how - “later”, “never”?)?

Definitely not.

Having the Distribution Wizard means that both:

  • you don’t have a status stating that all those steps should not be executed again (this status is saved on disk after each step), the only thing which bypass this status is an upgrade (a change in the distribution version)
  • one of the listed steps has something to do (you don’t have any flavor or the one found is invalid, you have orphaned dependencies, you have an invalid extension)

Having the DW in the middle of nowhere is not a great sign regarding the state of your permanent directory, it often means that the status file which was saved during the last upgrade has been lost for some reason (and the reason might mean that the entire permanent directory is not where it’s supposed to be anymore, or not accessible anymore).

Clicking Continue is not going to do anything, you will just see which step is enabled, and it might help you understand why it is.

Could you tell what the name of this file is supposed to be like and where it should be located?

When we reverted the change of the Infinispan config file and rebooted, the distribution wizard did NOT show up. That is, it was triggered by this change. How could this be explained? (If you have no idea right away we will go one step further as you suggested.)

Update: I just found an entry

ERROR h.i.DefaultExtensionJobHistory - Failed to read extension job history from [/usr/local/xwiki/data/extension/history/2022.09.26.xml]

in the startup log. A Java NullPointerException is blamed. This appeared also at previous startups also after the last startup when we reverted the change again, but only after the Infinispan config change the distribution wizard was showing up.

BTW this file actually exists and does not look corrupted, alongside with >10 other similar XML files with mostly newer dates.

If the parsing went so bad that it crash the initialization of the cache module, it also crashed the initialize of quite a few other things, in which case you can definitely end up with strange things.

A more detailed error might help, but one thing which does cause this kind of thing is missing --add-opens passed to the java command line (see the blue box in https://dev.xwiki.org/xwiki/bin/view/Community/SupportStrategy/JavaSupportStrategy/#HSupportedJavaVersions). AFAIK Tomcat have the right ones by default but it’s easy to loose them when you customize the setup a bit.

This is the complete log entry related to the error:

2024-06-17 12:21:19,110 [main] ERROR h.i.DefaultExtensionJobHistory - Failed to read extension job history from [/usr/local/xwiki/data/extension/history/2022.09.26.xml]. 
java.lang.NullPointerException: null
	at java.base/java.util.Collections.reverse(Unknown Source)
	at org.xwiki.extension.job.history.internal.DefaultExtensionJobHistory.load(DefaultExtensionJobHistory.java:176)
	at org.xwiki.extension.job.history.internal.DefaultExtensionJobHistory.initialize(DefaultExtensionJobHistory.java:112)
	at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
	at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:365)
	at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
	at org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
	at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
	at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
	at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceMap(EmbeddableComponentManager.java:242)
	at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceList(EmbeddableComponentManager.java:225)
	at org.xwiki.observation.internal.DefaultObservationManager.initializeListeners(DefaultObservationManager.java:166)
	at org.xwiki.observation.internal.DefaultObservationManager.getListenersByEvent(DefaultObservationManager.java:132)
	at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:283)
	at org.xwiki.component.internal.StackingComponentEventManager.sendEvent(StackingComponentEventManager.java:151)
	at org.xwiki.component.internal.StackingComponentEventManager.flushEvents(StackingComponentEventManager.java:92)
	at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:124)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4769)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5231)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:698)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:696)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1185)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1933)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1095)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1618)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:946)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:835)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:265)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:432)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)

We are using OpenJDK, JVM version 11.0.16.1+1, by Eclipse Adoptium, so not sure if this can be relevant. Also I wouldn’t understand how a general problem in the Tomcat/Java configuration can cause an error while reading just one of > 10 extension job history files.

We now repeated the change to make the distribution wizard screen reappear and then try to continue from there as suggested, to learn more about the cause.

But, luckily or not, the wizard did NOT appear this time, instead the app started normally. This also after a repeated shutdown so we can’t reproduce although we applied exactly the same changed Infinispan config file.

At least, the “Failed to load the cache in 5 attempts” error related to the security cache does not appear any more so far (previously, it probably would have in the meantime) so if this stays like that, we could say our general aim of the cache increase has been achieved.

Yes, definitely looks like a missing --add-opens (the java.util one to be more precise).

The reason it ends up being an nullpointerexception is because it cannot create the list xwiki-commons/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/job/history/internal/DefaultExtensionJobHistory.java at master · xwiki/xwiki-commons · GitHub is supposed to return, and the code does not really expect that.

We would try to include these missing add-opens but unfortunately we’re not really competent in Java and are quite unsure how exactly to apply this. We are using a Kubernetes deployment and I guess we would need to somehow pass that line from your JavaSupportStrategy page as an environment variable. This is our deployment.yaml (where you can also see how we invoked the Infinispan config change which is stored in a separate file):

apiVersion: apps/v1
kind: Deployment
metadata:
  name: xwiki
  labels:
    app: xwiki
spec:
  replicas: 1
  strategy:
    # Recreated is used because this image uses a volume that can't be shared
    type: Recreate
  selector:
    matchLabels:
      app: xwiki
  template:
    metadata:
      labels:
        app: xwiki
    spec:
      containers:
        - name: "xwiki"
          image: xwiki:13.10.9-postgres-tomcat
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8080
          env:
            - name: JAVA_OPTS
              value: -Xmx2048m
            - name: DB_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: db-secret
                  key: password
            - name: DB_HOST
              value: "kubegres.kubegres-system"
            - name: DB_USER
              valueFrom:
                secretKeyRef:
                  name: db-secret
                  key: username
            - name: DB_DATABASE
              value: xwiki
          resources:
            limits:
              cpu: '3'
              memory: 5Gi
            requests:
              cpu: 500m
              memory: 4Gi
          volumeMounts:
            - name: xwiki
              mountPath: /usr/local/xwiki
            - name: xwiki-config-files
              mountPath: /usr/local/tomcat/webapps/ROOT/WEB-INF/cache/infinispan/config.xml
              subPath: infinispan-config
              readOnly: true
      volumes:
        - name: xwiki
          persistentVolumeClaim:
            claimName: xwiki
        - name: xwiki-config-files
          configMap:
            name: xwiki-config-files
            items:
              - key: infinispan-config
                path: infinispan-config

I guess we would need to set an environment variable with the add-opens but not sure even about the name. Would it be JDK_JAVA_OPTIONS (that’s what I read somewhere) or extend the JAVA_OPTS which is already used? Or might it be JAVA_TOOL_OPTIONS? Another question is if there should be an equals sign (=) between the add-opens command and the following command (like add-opens=java.base/java.util=ALL-UNNAMED), which I also read somewhere.