Uploaded image for project: 'Formula pre-caching listener'
  1. Formula pre-caching listener
  2. FPLISTEN-2

Listener fails with an exception on XWiki 15.10.10 (when formula macro is not installed)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.1
    • 1.0
    • None
    • Unknown

    Description

      On XWiki 15.10.10, the formula macro is not bundled by default in the standard war.

      The pre-cacher injects a formula macro but does not add it as a dependency. Thus, when installed on 15.10.10, it fails to initialize the job, with an exception in the logs:

      2024-06-01 00:47:44,603 [XWiki initialization] ERROR r.f.i.FormulaPreCacherListener - Failed to start formula pre-caching job. 
      org.xwiki.job.JobException: Failed to lookup any Job for role hint [formula.precache]
              at org.xwiki.job.internal.DefaultJobExecutor.createJob(DefaultJobExecutor.java:305)
              at org.xwiki.job.internal.DefaultJobExecutor.execute(DefaultJobExecutor.java:316)
              at org.xwiki.contrib.rendering.formula.internal.FormulaPreCacherListener.onEvent(FormulaPreCacherListener.java:87)
              at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:338)
              at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:303)
              at com.xpn.xwiki.internal.XWikiInitializerJob.runInternal(XWikiInitializerJob.java:117)
              at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:246)
              at org.xwiki.job.AbstractJob.run(AbstractJob.java:223)
              at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.contrib.rendering.formula.internal.FormulaPreCachingJob] identified by type [interface org.xwiki.job.Job] and hint [formula.precache]
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:332)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:320)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:302)
              at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83)
              at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83)
              at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83)
              at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83)
              at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83)
              at org.xwiki.job.internal.DefaultJobExecutor.createJob(DefaultJobExecutor.java:303)
              ... 8 common frames omitted
      Caused by: org.xwiki.component.manager.ComponentLookupException: Can't find descriptor for the component with type [interface org.xwiki.rendering.macro.Macro] and hint [formula]
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:304)
              at org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:591)
              at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:540)
              at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:642)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:329)
              ... 16 common frames omitted
      2024-06-01 00:49:58,808 [com.xpn.xwiki.internal.WikiInitializerJob@6f35b7e0([initialization, wiki, <redacted>])] ERROR r.f.i.FormulaPreCacherListener - Failed to start formula pre-caching job. 
      org.xwiki.job.JobException: Failed to lookup any Job for role hint [formula.precache]
              at org.xwiki.job.internal.DefaultJobExecutor.createJob(DefaultJobExecutor.java:305)
              at org.xwiki.job.internal.DefaultJobExecutor.execute(DefaultJobExecutor.java:316)
              at org.xwiki.contrib.rendering.formula.internal.FormulaPreCacherListener.onEvent(FormulaPreCacherListener.java:87)
              at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:338)
              at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:303)
              at com.xpn.xwiki.internal.WikiInitializerJob.runInternal(WikiInitializerJob.java:106)
              at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:246)
              at org.xwiki.job.AbstractJob.run(AbstractJob.java:223)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.contrib.rendering.formula.internal.FormulaPreCachingJob] identified by type [interface org.xwiki.job.Job] and hint [formula.precache]
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:332)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:320)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:302)
              at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83)
              at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83)
              at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83)
              at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83)
              at org.xwiki.component.internal.multi.DelegateComponentManager.getInstance(DelegateComponentManager.java:83)
              at org.xwiki.job.internal.DefaultJobExecutor.createJob(DefaultJobExecutor.java:303)
              ... 10 common frames omitted
      Caused by: org.xwiki.component.manager.ComponentLookupException: Can't find descriptor for the component with type [interface org.xwiki.rendering.macro.Macro] and hint [formula]
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:304)
              at org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:591)
              at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:540)
              at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:642)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:329)
              ... 18 common frames omitted
      

      Attachments

        Activity

          People

            lucaa Anca Luca
            lucaa Anca Luca
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: