Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-3929

Alert engine opens repository twice

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 3.5
    • 3.5
    • None
    • None

      since recently (alert on archive ?) when starting my app I have twice the warn message on .lock for repo and then an error on AlertEngine (cannot start repo in use)

      Looks like it does start the repo by itselelf!
      Or doing something too soon in the startup process

          [CMS-3929] Alert engine opens repository twice

          Laurence has let a debug value that started the engine during startup

          Raphaël Franchet added a comment - Laurence has let a debug value that started the engine during startup

          org.apache.avalon.framework.CascadingRuntimeException: Error during environment's setup.
          	at org.ametys.cms.engine.BackgroundEngineHelper.createAndEnterEngineEnvironment(BackgroundEngineHelper.java:67)
          	at org.ametys.cms.alerts.AlertEngine.run(AlertEngine.java:242)
          	at java.lang.Thread.run(Thread.java:619)
          Caused by: org.apache.avalon.framework.service.ServiceException: Unable to initialize the ComponentManager (key [org.apache.cocoon.Processor]) (Key='org.apache.cocoon.Processor')
          	at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:80)
          	at org.ametys.cms.engine.BackgroundEngineHelper.createAndEnterEngineEnvironment(BackgroundEngineHelper.java:63)
          	... 2 more
          Caused by: org.apache.avalon.framework.component.ComponentException: Unable to initialize the ComponentManager (key [org.apache.cocoon.Processor])
          	at org.ametys.runtime.cocoon.TreeProcessor.compose(TreeProcessor.java:94)
          	at org.apache.avalon.framework.container.ContainerUtil.compose(ContainerUtil.java:173)
          	at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:266)
          	at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108)
          	at org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(ExcaliburComponentManager.java:278)
          	at org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComponentManager.java:354)
          	at org.ametys.runtime.plugin.component.PluginsComponentManager.lookup(PluginsComponentManager.java:72)
          	at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:68)
          	... 3 more
          Caused by: java.lang.Exception: Caught an exception trying to initialize the component org.ametys.web.live.RebuildLiveWorkspaceTimerTask
          	at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.initialize(ThreadSafeComponentManager.java:205)
          	at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
          	at org.ametys.runtime.cocoon.TreeProcessor.compose(TreeProcessor.java:62)
          	... 10 more
          Caused by: org.apache.avalon.framework.service.ServiceException: Unable to initialize component javax.jcr.Repository (key [javax.jcr.Repository]) (Key='javax.jcr.Repository')
          	at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:80)
          	at org.ametys.web.live.RebuildLiveWorkspaceTimerTask.service(RebuildLiveWorkspaceTimerTask.java:94)
          	at org.apache.avalon.framework.container.ContainerUtil.service(ContainerUtil.java:143)
          	at org.ametys.runtime.plugin.component.ThreadSafeComponentManager$ComponentFactory.instanciate(ThreadSafeComponentManager.java:376)
          	at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:104)
          	at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:94)
          	at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.initialize(ThreadSafeComponentManager.java:200)
          	... 12 more
          Caused by: org.apache.avalon.framework.component.ComponentException: Unable to initialize component javax.jcr.Repository (key [javax.jcr.Repository])
          	at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.lookup(ThreadSafeComponentManager.java:134)
          	at org.ametys.runtime.plugin.component.PluginsComponentManager.lookup(PluginsComponentManager.java:64)
          	at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:68)
          	... 18 more
          Caused by: javax.jcr.RepositoryException: The repository home D:\Dev\raphael\Ametys\templates\CMSWEB\trunk\webapp\cms\WEB-INF\data\repository appears to be in use since the file named .lock is already locked by the current process.
          	at org.apache.jackrabbit.core.util.RepositoryLock.tryLock(RepositoryLock.java:159)
          	at org.apache.jackrabbit.core.util.RepositoryLock.acquire(RepositoryLock.java:138)
          	at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:253)
          	at org.ametys.plugins.repository.provider.AmetysRepository.<init>(AmetysRepository.java:45)
          	at org.ametys.plugins.repository.provider.JackrabbitRepository.initialize(JackrabbitRepository.java:76)
          	at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
          	at org.ametys.runtime.plugin.component.ThreadSafeComponentManager$ComponentFactory.configureAndStart(ThreadSafeComponentManager.java:392)
          	at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:112)
          	at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:94)
          	at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.lookup(ThreadSafeComponentManager.java:130)
          	... 20 more
          

          Raphaël Franchet added a comment - org.apache.avalon.framework.CascadingRuntimeException: Error during environment's setup. at org.ametys.cms.engine.BackgroundEngineHelper.createAndEnterEngineEnvironment(BackgroundEngineHelper.java:67) at org.ametys.cms.alerts.AlertEngine.run(AlertEngine.java:242) at java.lang. Thread .run( Thread .java:619) Caused by: org.apache.avalon.framework.service.ServiceException: Unable to initialize the ComponentManager (key [org.apache.cocoon.Processor]) (Key= 'org.apache.cocoon.Processor' ) at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:80) at org.ametys.cms.engine.BackgroundEngineHelper.createAndEnterEngineEnvironment(BackgroundEngineHelper.java:63) ... 2 more Caused by: org.apache.avalon.framework.component.ComponentException: Unable to initialize the ComponentManager (key [org.apache.cocoon.Processor]) at org.ametys.runtime.cocoon.TreeProcessor.compose(TreeProcessor.java:94) at org.apache.avalon.framework.container.ContainerUtil.compose(ContainerUtil.java:173) at org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:266) at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:108) at org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(ExcaliburComponentManager.java:278) at org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComponentManager.java:354) at org.ametys.runtime.plugin.component.PluginsComponentManager.lookup(PluginsComponentManager.java:72) at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:68) ... 3 more Caused by: java.lang.Exception: Caught an exception trying to initialize the component org.ametys.web.live.RebuildLiveWorkspaceTimerTask at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.initialize(ThreadSafeComponentManager.java:205) at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244) at org.ametys.runtime.cocoon.TreeProcessor.compose(TreeProcessor.java:62) ... 10 more Caused by: org.apache.avalon.framework.service.ServiceException: Unable to initialize component javax.jcr.Repository (key [javax.jcr.Repository]) (Key= 'javax.jcr.Repository' ) at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:80) at org.ametys.web.live.RebuildLiveWorkspaceTimerTask.service(RebuildLiveWorkspaceTimerTask.java:94) at org.apache.avalon.framework.container.ContainerUtil.service(ContainerUtil.java:143) at org.ametys.runtime.plugin.component.ThreadSafeComponentManager$ComponentFactory.instanciate(ThreadSafeComponentManager.java:376) at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:104) at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:94) at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.initialize(ThreadSafeComponentManager.java:200) ... 12 more Caused by: org.apache.avalon.framework.component.ComponentException: Unable to initialize component javax.jcr.Repository (key [javax.jcr.Repository]) at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.lookup(ThreadSafeComponentManager.java:134) at org.ametys.runtime.plugin.component.PluginsComponentManager.lookup(PluginsComponentManager.java:64) at org.apache.avalon.framework.service.WrapperServiceManager.lookup(WrapperServiceManager.java:68) ... 18 more Caused by: javax.jcr.RepositoryException: The repository home D:\Dev\raphael\Ametys\templates\CMSWEB\trunk\webapp\cms\WEB-INF\data\repository appears to be in use since the file named .lock is already locked by the current process. at org.apache.jackrabbit.core.util.RepositoryLock.tryLock(RepositoryLock.java:159) at org.apache.jackrabbit.core.util.RepositoryLock.acquire(RepositoryLock.java:138) at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:253) at org.ametys.plugins.repository.provider.AmetysRepository.<init>(AmetysRepository.java:45) at org.ametys.plugins.repository.provider.JackrabbitRepository.initialize(JackrabbitRepository.java:76) at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244) at org.ametys.runtime.plugin.component.ThreadSafeComponentManager$ComponentFactory.configureAndStart(ThreadSafeComponentManager.java:392) at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:112) at org.ametys.runtime.plugin.component.PluginsComponentManager$ProxyComponentFactory.newInstance(PluginsComponentManager.java:94) at org.ametys.runtime.plugin.component.ThreadSafeComponentManager.lookup(ThreadSafeComponentManager.java:130) ... 20 more

            Unassigned Unassigned
            raphael Raphaël Franchet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: