{"record":{"id":"ebf008f3436fe020","repo":"flowable/flowable-engine","slug":"jobid-and-job-is-null","errorCode":null,"errorMessage":"jobId and job is null","messagePattern":"jobId and job is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/cmd/MoveDeadLetterJobToExecutableJobCmd.java","lineNumber":51,"sourceCode":"\n    private static final Logger LOGGER = LoggerFactory.getLogger(MoveDeadLetterJobToExecutableJobCmd.class);\n    \n    protected JobServiceConfiguration jobServiceConfiguration;\n\n    protected String jobId;\n    protected int retries;\n\n    public MoveDeadLetterJobToExecutableJobCmd(String jobId, int retries, JobServiceConfiguration jobServiceConfiguration) {\n        this.jobId = jobId;\n        this.retries = retries;\n        this.jobServiceConfiguration = jobServiceConfiguration;\n    }\n\n    @Override\n    public Job execute(CommandContext commandContext) {\n\n        if (jobId == null) {\n            throw new FlowableIllegalArgumentException(\"jobId and job is null\");\n        }\n\n        DeadLetterJobEntity job = jobServiceConfiguration.getDeadLetterJobEntityManager().findById(jobId);\n        if (job == null) {\n            throw new JobNotFoundException(jobId);\n        }\n\n        if (LOGGER.isDebugEnabled()) {\n            LOGGER.debug(\"Moving deadletter job to executable job table {}\", job.getId());\n        }\n\n        return jobServiceConfiguration.getJobManager().moveDeadLetterJobToExecutableJob(job, retries);\n    }\n\n    public String getJobId() {\n        return jobId;\n    }\n","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/cmd/MoveDeadLetterJobToExecutableJobCmd.java#L33-L69","documentation":"MoveDeadLetterJobToExecutableJobCmd.execute() requires a dead-letter jobId; if it is null it throws FlowableIllegalArgumentException with the (legacy) message 'jobId and job is null'. The command moves a job out of the dead-letter table back to the executable job table, which is impossible without an id.","triggerScenarios":"Calling ManagementService.moveDeadLetterJobToExecutableJob(jobId, ...) with a null jobId, or invoking the command programmatically without setting the id.","commonSituations":"Id pulled from a nullable search result or loop variable that was null for the current iteration; admin UI passes an unset field; batch retry scripts that do not filter null ids.","solutions":["Null-check the dead-letter job id before invoking moveDeadLetterJobToExecutableJob.","Skip or log entries with null ids in batch-retry loops instead of passing them through.","Fix the source (query/UI form) that produced a null id."],"exampleFix":"// before\nmanagementService.moveDeadLetterJobToExecutableJob(job.getId(), 3);\n// after\nif (job != null && job.getId() != null) {\n    managementService.moveDeadLetterJobToExecutableJob(job.getId(), 3);\n}","handlingStrategy":"validation","validationCode":"if (jobId == null || jobId.isEmpty()) throw new IllegalArgumentException(\"dead-letter jobId required\");","typeGuard":"boolean movable = job != null && job.getId() != null;","tryCatchPattern":"try { managementService.moveDeadLetterJobToExecutableJob(jobId, retries); } catch (FlowableIllegalArgumentException e) { log.error(\"Invalid jobId: {}\", e.getMessage()); }","preventionTips":["Filter null ids out of dead-letter retry batches","Validate UI/form inputs before invoking management APIs","Wrap management calls in helpers that enforce preconditions"],"tags":["flowable","null-argument","deadletter-job","illegal-argument"],"backgroundTag":"null-argument","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"}