Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-1076

'search.indexing.cronjob=disabled' creates ERROR: Context initialization failed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9.4.0
    • Labels:
      None
    • Environment:

      Red Hat Enterprise Linux Server release 6.5 (Santiago)

      Description

      The aim is to disable the indexing of files, neither at startup nor by cronjob.

      These settings in olat.local.properties

      generate.index.at.startup=false
      search.service=enabled
      search.indexing.cronjob=disabled
      # Start indexing at 00:05 a.m.
      search.indexing.cronjob.expression=0 5 0 * * ?
      

      cause the following error when OpenOLAT (Tomcat) starts:

      2014-04-28 17:16:44,523 [Thread-2] INFO  WebappHelper  - *********************************************
      2014-04-28 17:16:44,523 [Thread-2] INFO  WebappHelper  - *                SHUTDOWM                    
      2014-04-28 17:16:44,523 [Thread-2] INFO  WebappHelper  - *********************************************
      2014-04-28 17:16:44,523 [Thread-2] INFO  WebappHelper  - * Application:   OpenOLAT
      2014-04-28 17:16:44,523 [Thread-2] INFO  WebappHelper  - * StopTimeStamp: Mon Apr 28 17:16:44 CEST 2014
      2014-04-28 17:16:44,523 [Thread-2] INFO  WebappHelper  - *********************************************
      2014-04-28 17:16:44,523 [Thread-2] INFO  WebappHelper  - 
      2014-04-28 17:16:44,525 [Thread-2] ERROR ContextLoader  - Context initialization failed
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schedulerFactoryBean' defined in class path resource [org/olat/core/commons/services/scheduler/_spring/schedulerContext.xml]: Cannot resolve reference to bean 'searchIndexingTrigger' while setting bean property 'triggers' with key [3]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'searchIndexingTrigger' defined in class path resource [org/olat/core/commons/services/scheduler/_spring/schedulerContext.xml]: Cannot resolve reference to bean 'org.olat.search.job.disabled' while setting bean property 'jobDetail'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.olat.search.job.disabled' defined in class path resource [org/olat/core/commons/services/scheduler/_spring/schedulerContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class' for property 'jobClass'; nested exception is java.lang.IllegalArgumentException: Cannot find class [org.olat.core.commons.scheduler.DummyJob]
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)
              at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:154)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
              at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
              at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:610)
              at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
              at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
              at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
              at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
              at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
              at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
              at java.util.concurrent.FutureTask.run(FutureTask.java:262)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:744)
      

      To achieve the aim above the following settings are done:

      generate.index.at.startup=false
      search.service=enabled
      search.indexing.cronjob=enabled
      # Start indexing at 00:05 a.m. 2099
      search.indexing.cronjob.expression=0 5 0 * * ? 2099
      

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            guenter Günter Krausgruber
            Tester:
            Florian Gnägi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m