{"record":{"id":"78fdaaeb7cbdc9d6","repo":"flowable/flowable-engine","slug":"must-be-followed-by-an-integer","errorCode":null,"errorMessage":"'/' must be followed by an integer.","messagePattern":"'/' must be followed by an integer\\.","errorType":"exception","errorClass":"ParseException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/CronExpression.java","lineNumber":636,"sourceCode":"                throw new ParseException(\"'?' can only be specified for Day-of-Month or Day-of-Week.\", i);\n            }\n            if (type == DAY_OF_WEEK && !lastdayOfMonth) {\n                int val = daysOfMonth.last();\n                if (val == NO_SPEC_INT) {\n                    throw new ParseException(\"'?' can only be specified for Day-of-Month -OR- Day-of-Week.\", i);\n                }\n            }\n\n            addToSet(NO_SPEC_INT, -1, 0, type);\n            return i;\n        }\n\n        if (c == '*' || c == '/') {\n            if (c == '*' && (i + 1) >= s.length()) {\n                addToSet(ALL_SPEC_INT, -1, incr, type);\n                return i + 1;\n            } else if (c == '/' && ((i + 1) >= s.length() || s.charAt(i + 1) == ' ' || s.charAt(i + 1) == '\\t')) {\n                throw new ParseException(\"'/' must be followed by an integer.\", i);\n            } else if (c == '*') {\n                i++;\n            }\n            c = s.charAt(i);\n            if (c == '/') { // is an increment specified?\n                i++;\n                if (i >= s.length()) {\n                    throw new ParseException(\"Unexpected end of string.\", i);\n                }\n\n                incr = getNumericValue(s, i);\n\n                i++;\n                if (incr > 10) {\n                    i++;\n                }\n                checkIncrementRange(incr, type, i);\n            } else {","sourceCodeStart":618,"sourceCodeEnd":654,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/CronExpression.java#L618-L654","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nnew CronExpression(\"0 0/ * * * ?\");\n// after\nnew CronExpression(\"0 0/15 * * * ?\");","handlingStrategy":"validation","validationCode":"if (java.util.regex.Pattern.compile(\"/\\\\s\").matcher(expr).find()) {\n    throw new IllegalArgumentException(\"'/' must be followed by a step integer: \" + expr);\n}","typeGuard":null,"tryCatchPattern":"try {\n    new CronExpression(expr);\n} catch (java.text.ParseException e) {\n    if (e.getMessage().contains(\"'/' must be followed\")) {\n        throw new IllegalArgumentException(\"Dangling '/' in cron field: \" + expr, e);\n    }\n}","preventionTips":["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"],"tags":["cron","parse-error","increment"],"backgroundTag":"invalid-argument-format","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}