Uploaded image for project: 'Numbered Content Application'
  1. Numbered Content Application
  2. NCAPP-37

"Cache with name [numbered.content.headings.cache] already exist" after installng a new version

    XMLWordPrintable

Details

    • Bug
    • Resolution: Solved By
    • Major
    • None
    • 1.1
    • None
    • None
    • Unknown
    • N/A
    • N/A

    Description

      After a refresh / reinstall/update the following error message appears on the XWiki.XWikiSyntaxMacrosList :

       

       Failed to execute the [velocity] macro. Cause: [Cache with name [numbered.content.headings.cache] already exist]. 
      
      [...]
      Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to lookup component with type [interface org.xwiki.rendering.macro.Macro] and hint [reference]
      	at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceMap(EmbeddableComponentManager.java:245)
      	at org.xwiki.component.internal.multi.DelegateComponentManager.getInstanceMap(DelegateComponentManager.java:95)
      	at org.xwiki.component.internal.multi.DelegateComponentManager.getInstanceMap(DelegateComponentManager.java:95)
      	at org.xwiki.component.internal.multi.DelegateComponentManager.getInstanceMap(DelegateComponentManager.java:95)
      	at org.xwiki.component.internal.multi.DelegateComponentManager.getInstanceMap(DelegateComponentManager.java:95)
      	at org.xwiki.component.internal.multi.DelegateComponentManager.getInstanceMap(DelegateComponentManager.java:95)
      	at org.xwiki.rendering.internal.macro.DefaultMacroManager.getMacroIds(DefaultMacroManager.java:87)
      	... 207 more
      Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to lookup component with type [interface org.xwiki.contrib.numberedreferences.HeaderNumberingService] and hint [headings]
      	at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceMap(EmbeddableComponentManager.java:245)
      	at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceList(EmbeddableComponentManager.java:225)
      	at org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:393)
      	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)
      	... 213 more
      Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.contrib.numbered.headings.internal.DefaultHeadersNumberingCacheManager] identified by type [interface org.xwiki.contrib.numbered.headings.internal.HeadersNumberingCacheManager] and hint [default]
      	at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
      	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)
      	... 218 more
      Caused by: org.xwiki.component.phase.InitializationException: Failed to create the cache.
      	at org.xwiki.contrib.numbered.headings.internal.DefaultHeadersNumberingCacheManager.initialize(DefaultHeadersNumberingCacheManager.java:119)
      	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)
      	... 222 more
      Caused by: org.xwiki.cache.CacheException: Cache with name [numbered.content.headings.cache] already exist
      	at org.xwiki.cache.infinispan.internal.InfinispanCacheFactory.newCache(InfinispanCacheFactory.java:152)
      	at org.xwiki.cache.internal.DefaultCacheManager.createNewCache(DefaultCacheManager.java:112)
      	at org.xwiki.cache.internal.DefaultCacheManager.createNewCache(DefaultCacheManager.java:85)
      	at org.xwiki.contrib.numbered.headings.internal.DefaultHeadersNumberingCacheManager.initialize(DefaultHeadersNumberingCacheManager.java:117)
      	... 226 more
      

      I guess the cache needs to be destroyed on an "Uninstall" event, or only created if not already present.

      Attachments

        Issue Links

          Activity

            People

              mleduc Manuel Leduc
              camil7 Clemens Robbenhaar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: