tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kean Erickson <kean.erick...@gmail.com>
Subject ScheduledExpression: for some wildcard expressions, getting "Fail to parse schedule expression"
Date Mon, 13 May 2019 19:06:41 GMT
Hello,

I've noticed that scheduled expressions will fail when using wildcards with
a number greater than the maximum unit. For example, if I set a schedule to
run every 60 minutes (as opposed to 59, which works):

        ScheduleExpression expression = new ScheduleExpression();
        expression.minute("*/60");
        return expression;

I then get the error below. To my knowledge, "*/60" is an OK cron
expression, so it should be supported. Please let me know if this is a
valid concern not currently on the radar and I'll file a bug entry for it.
I'm aware that an hourly equivalent would work but I need the number of
minutes to be changeable up to 1400 minutes (one day).

13-May-2019 11:29:35.199 SEVERE [localhost-startStop-1]
org.apache.openejb.core.transaction.EjbTransactionUtil.handleSystemException
EjbTransactionUtil.handleSystemException: Fail to parse schedule expression
javax.ejb.ScheduleExpression@61f48baf
 java.lang.IllegalArgumentException: Fail to parse schedule expression
javax.ejb.ScheduleExpression@61f48baf
    at
org.apache.openejb.core.timer.CalendarTimerData.initializeTrigger(CalendarTimerData.java:64)
    at org.apache.openejb.core.timer.TimerData.newTimer(TimerData.java:222)
    at
org.apache.openejb.core.timer.EjbTimerServiceImpl.initializeNewTimer(EjbTimerServiceImpl.java:738)
    at
org.apache.openejb.core.timer.EjbTimerServiceImpl.createTimer(EjbTimerServiceImpl.java:715)
    at
org.apache.openejb.core.timer.TimerServiceImpl.createCalendarTimer(TimerServiceImpl.java:79)
    at
org.apache.openejb.core.timer.TimerServiceWrapper.createCalendarTimer(TimerServiceWrapper.java:75)
    at
com.omniupdate.ox.workers.PasswordHashExpirer.postConstruct(PasswordHashExpirer.java:36)
        ....
Caused by: ParseException [field=null, value=null, error=null]
    at
org.apache.openejb.core.timer.EJBCronTrigger.<init>(EJBCronTrigger.java:139)
    at
org.apache.openejb.core.timer.CalendarTimerData.initializeTrigger(CalendarTimerData.java:61)
    ... 53 more


Thanks,
-Kean

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message