Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-3086

Error mode when captcha.clean.period is >60

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 4.2.0
    • 4.2.0
    • None
    • None
    • 4.2 M10

      if runtime.captcha.jcaptcha.clean.period is > 60 or < 0, then Ametys starts in error mode with following error :

      Date:            Mon Jan 21 09:53:44 CET 2019 (1548060824083)
      Thread:        localhost-startStop-1
      Message #:    25
      Level:        ERROR
      NDC:            
      Category:    org.ametys.runtime.servlet.RuntimeServlet
      Message:        Error while loading Ametys. Entering in error mode.
      Location:    org.ametys.runtime.servlet.RuntimeServlet.init(RuntimeServlet.java:215)
      Thrown:
      java.lang.RuntimeException: CronExpression '0 0/600 * * * ?' is invalid.
          at org.quartz.CronScheduleBuilder.cronSchedule(CronScheduleBuilder.java:111)
          at org.ametys.plugins.core.schedule.Scheduler.scheduleJob(Scheduler.java:365)
          at org.ametys.plugins.core.schedule.Scheduler._scheduleConfigurableJobs(Scheduler.java:292)
          at org.ametys.plugins.core.schedule.Scheduler.start(Scheduler.java:250)
          at org.ametys.plugins.core.schedule.SchedulerInit.init(SchedulerInit.java:41)
          at org.ametys.runtime.servlet.RuntimeServlet._initPlugins(RuntimeServlet.java:370)
          at org.ametys.runtime.servlet.RuntimeServlet._initAmetys(RuntimeServlet.java:308)
          at org.ametys.runtime.servlet.RuntimeServlet.init(RuntimeServlet.java:209)
          at javax.servlet.GenericServlet.init(GenericServlet.java:158)
          at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
          at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1031)
          at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4913)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5200)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
          at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
          at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1720)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
      Caused by: java.text.ParseException: Increment > 60 : 600
          at org.quartz.CronExpression.checkIncrementRange(CronExpression.java:705)
          at org.quartz.CronExpression.checkNext(CronExpression.java:840)
          at org.quartz.CronExpression.storeExpressionVals(CronExpression.java:693)
          at org.quartz.CronExpression.buildExpression(CronExpression.java:487)
          at org.quartz.CronExpression.<init>(CronExpression.java:276)
          at org.quartz.CronScheduleBuilder.cronSchedule(CronScheduleBuilder.java:107)
          ... 24 more
      

      This conf parameter should be protected with min and max validation values.
      What's more, maybe there is the same bug with other conf parameters which schedule something.
      And mechanism to schedule things with confs may be improved ? Issues can be opened...

            bmaurel Bérénice Maurel
            sprieul Simon Prieul (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: