flowable/flowable-engine · error · FlowableIllegalArgumentException
jobId and job is null
Error message
jobId and job is null
What it means
MoveTimerToExecutableJobCmd.execute() requires a timer jobId and throws FlowableIllegalArgumentException with message 'jobId and job is null' when it is null. The command promotes a timer job (ACT_RU_TIMER_JOB) to the executable job table; without an id there is nothing to move.
Source
Thrown at modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/cmd/MoveTimerToExecutableJobCmd.java:48
public class MoveTimerToExecutableJobCmd implements Command<JobEntity>, Serializable {
private static final long serialVersionUID = 1L;
private static final Logger LOGGER = LoggerFactory.getLogger(MoveTimerToExecutableJobCmd.class);
protected String jobId;
protected JobServiceConfiguration jobServiceConfiguration;
public MoveTimerToExecutableJobCmd(String jobId, JobServiceConfiguration jobServiceConfiguration) {
this.jobId = jobId;
this.jobServiceConfiguration = jobServiceConfiguration;
}
@Override
public JobEntity execute(CommandContext commandContext) {
if (jobId == null) {
throw new FlowableIllegalArgumentException("jobId and job is null");
}
TimerJobEntity timerJob = jobServiceConfiguration.getTimerJobEntityManager().findById(jobId);
if (timerJob == null) {
throw new JobNotFoundException(jobId);
}
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Executing timer job {}", timerJob.getId());
}
return jobServiceConfiguration.getJobManager().moveTimerJobToExecutableJob(timerJob);
}
public String getJobId() {
return jobId;
}View on GitHub (pinned to d6d39ce1c6)
Solutions
- Validate the timer job id is non-null before calling moveTimerToExecutableJob.
- Skip null-id entries in batch promotion loops with a warning.
- Fix the query/payload source that yields the null id.
Example fix
// before
managementService.moveTimerToExecutableJob(timerId);
// after
if (timerId != null) {
managementService.moveTimerToExecutableJob(timerId);
} Defensive patterns
Strategy: validation
Validate before calling
if (timerJobId == null || timerJobId.isEmpty()) throw new IllegalArgumentException("timer jobId required"); Type guard
boolean promotable = timerJob != null && timerJob.getId() != null;
Try / catch
try { managementService.moveTimerToExecutableJob(timerId); } catch (FlowableIllegalArgumentException e) { log.error("Invalid timer id: {}", e.getMessage()); } Prevention
- Validate timer ids from external schedulers before promotion
- Guard batch promotion loops against null entries
- Keep a single helper for id validation across job management calls
When it happens
Trigger: Calling ManagementService.moveTimerToExecutableJob(timerJobId) with a null id, or executing the command directly.
Common situations: Timer id taken from a nullable timer-job query result or external scheduler payload; admin consoles submitting empty ids; scripts that do not check for null before moving.
Related errors
- The timer job id is mandatory, but 'null' has been provided.
- Provided exception message is null
- Provided execution id is null
- Empty timer job can not be scheduled
- jobId is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/bcb60cd9a2e6a4ba.
Report an issue: GitHub.