flowable/flowable-engine · error · ParseException
'/' must be followed by an integer.
Error message
'/' must be followed by an integer.
What it means
Thrown when an increment '/' is specified but nothing valid follows it: the expression ends or the next character is a space/tab. The parser requires 'start/step' where step is an integer, e.g. '0/15' in the minutes field. A dangling '/' is a syntax error.
Solutions
- Provide the step integer after '/': '0/15', '*/5', '1/10'.
- Check for empty or whitespace-only step variables when the expression is built dynamically.
- Trim the expression and ensure no field ends with '/'.
- Use validateExpression on configuration load so bad cron strings fail at startup, not at first trigger.
Example fix
// before
new CronExpression("0 0/ * * * ?");
// after
new CronExpression("0 0/15 * * * ?"); Defensive patterns
Strategy: validation
Validate before calling
if (java.util.regex.Pattern.compile("/\\s").matcher(expr).find()) {
throw new IllegalArgumentException("'/' must be followed by a step integer: " + expr);
} Try / catch
try {
new CronExpression(expr);
} catch (java.text.ParseException e) {
if (e.getMessage().contains("'/' must be followed")) {
throw new IllegalArgumentException("Dangling '/' in cron field: " + expr, e);
}
} Prevention
- Always supply a step after '/': 0/15, */5, 1/10
- Check dynamic step variables for null/empty before interpolation
- Trim and sanity-check expressions loaded from config
When it happens
Trigger: new CronExpression("0 0/ * * * ?") or "0 0/" — '/' at end of a field followed by whitespace; string truncation leaving a trailing '/'; joining fields with a trailing separator.
Common situations: Truncated expressions from config files cut at whitespace; dynamic building where the step variable was empty/null producing '0/' + ' ' + rest; hand-editing that deleted the step value.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- A numeric value between 1 and 5 must follow the '#' option
- '?' can only be specified for Day-of-Month -OR- Day-of-Week.
- '?' can only be specified for Day-of-Month or Day-of-Week.
- Illegal character after ?:
- Illegal characters for this position: '
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/78fdaaeb7cbdc9d6.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/CronExpression.java:636
throw new ParseException("'?' can only be specified for Day-of-Month or Day-of-Week.", i);
}
if (type == DAY_OF_WEEK && !lastdayOfMonth) {
int val = daysOfMonth.last();
if (val == NO_SPEC_INT) {
throw new ParseException("'?' can only be specified for Day-of-Month -OR- Day-of-Week.", i);
}
}
addToSet(NO_SPEC_INT, -1, 0, type);
return i;
}
if (c == '*' || c == '/') {
if (c == '*' && (i + 1) >= s.length()) {
addToSet(ALL_SPEC_INT, -1, incr, type);
return i + 1;
} else if (c == '/' && ((i + 1) >= s.length() || s.charAt(i + 1) == ' ' || s.charAt(i + 1) == '\t')) {
throw new ParseException("'/' must be followed by an integer.", i);
} else if (c == '*') {
i++;
}
c = s.charAt(i);
if (c == '/') { // is an increment specified?
i++;
if (i >= s.length()) {
throw new ParseException("Unexpected end of string.", i);
}
incr = getNumericValue(s, i);
i++;
if (incr > 10) {
i++;
}
checkIncrementRange(incr, type, i);
} else {View on GitHub (pinned to d6d39ce1c6)