1

这是我第一次遇到这个问题并试图从中得到一些东西,但无法弄清楚这个问题的实际原因/解决方案。任何有关这方面的帮助都会有很大帮助。

2013-09-26 00:26:52,657 [Thread-2] ERROR org.springframework.web.context.ContextLoader  - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.scheduling.config.ScheduledTaskRegistrar#0': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Range exceeds maximum (8): 2525
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1422)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
        at com.qtl.everest.web.SpringContextLoaderListener.contextInitialized(SpringContextLoaderListener.java:74)
        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$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalArgumentException: Range exceeds maximum (8): 2525
        at org.springframework.scheduling.support.CronSequenceGenerator.getRange(CronSequenceGenerator.java:334)
        at org.springframework.scheduling.support.CronSequenceGenerator.setNumberHits(CronSequenceGenerator.java:297)
        at org.springframework.scheduling.support.CronSequenceGenerator.setDays(CronSequenceGenerator.java:275)
        at org.springframework.scheduling.support.CronSequenceGenerator.parse(CronSequenceGenerator.java:241)
        at org.springframework.scheduling.support.CronSequenceGenerator.<init>(CronSequenceGenerator.java:81)
        at org.springframework.scheduling.support.CronTrigger.<init>(CronTrigger.java:54)
        at org.springframework.scheduling.support.CronTrigger.<init>(CronTrigger.java:44)
        at org.springframework.scheduling.config.ScheduledTaskRegistrar.afterPropertiesSet(ScheduledTaskRegistrar.java:129)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1479)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419)
        ... 20 more

编辑:Cron 声明

<task:scheduled-tasks scheduler="scheduler">
        <!-- Update date filters each midnight +30 sec (to cover the time errors 
            of the scheduler) -->
        <task:scheduled ref="IndexGroupSearchersManager"
            method="updateDateFilterQueries" cron="30 0 0 * * ?" />
        <!-- Send favorite search alerts once a week -->
        <task:scheduled ref="favoriteSearchAlertService"
            method="sendAlerts" cron="${everest.account.favoriteSearch.alerting.cronPattern}" />
    </task:scheduled-tasks>

在哪里,everest.account.favoriteSearch.alerting.cronPattern=0 0 22 * * SUN

4

0 回答 0