flowable/flowable-engine · error · FlowableObjectNotFoundException
Suspended job with id '' doesn't have an exception stacktrac
Error message
Suspended job with id '' doesn't have an exception stacktrace.
What it means
Thrown when GET /cmmn-management/suspended-jobs/{jobId}-exception-stacktrace returns a suspended job but the management service has no stored exception stacktrace for it (null). The suspended job exists but has not failed, so there is no stacktrace resource to return.
Source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/management/JobExceptionStacktraceResource.java:88
}
response.setContentType("text/plain");
return stackTrace;
}
@ApiOperation(value = "Get the exception stacktrace for a suspended job", tags = { "Jobs" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Indicates the requested job was not found and the stacktrace has been returned. The response contains the raw stacktrace and always has a Content-type of text/plain."),
@ApiResponse(code = 404, message = "Indicates the requested job was not found or the job does not have an exception stacktrace. Status-description contains additional information about the error.")
})
@GetMapping("/cmmn-management/suspended-jobs/{jobId}/exception-stacktrace")
public String getSuspendedJobStacktrace(@ApiParam(name = "jobId") @PathVariable String jobId, HttpServletResponse response) {
Job job = getSuspendedJobById(jobId);
String stackTrace = managementService.getSuspendedJobExceptionStacktrace(job.getId());
if (stackTrace == null) {
throw new FlowableObjectNotFoundException("Suspended job with id '" + job.getId() + "' doesn't have an exception stacktrace.", String.class);
}
response.setContentType("text/plain");
return stackTrace;
}
@ApiOperation(value = "Get the exception stacktrace for a deadletter job", tags = { "Jobs" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Indicates the requested job was not found and the stacktrace has been returned. The response contains the raw stacktrace and always has a Content-type of text/plain."),
@ApiResponse(code = 404, message = "Indicates the requested job was not found or the job does not have an exception stacktrace. Status-description contains additional information about the error.")
})
@GetMapping("/cmmn-management/deadletter-jobs/{jobId}/exception-stacktrace")
public String getDeadLetterJobStacktrace(@ApiParam(name = "jobId") @PathVariable String jobId, HttpServletResponse response) {
Job job = getDeadLetterJobById(jobId);
String stackTrace = managementService.getDeadLetterJobExceptionStacktrace(job.getId());
if (stackTrace == null) {View on GitHub (pinned to d6d39ce1c6)
Solutions
- Verify the job actually failed before requesting its stacktrace.
- Treat the 404 as informational ('no failure recorded') and continue.
- Check the suspended job's exceptionMessage via job query instead of fetching the stacktrace.
Example fix
// before
String trace = rest.get(pathSuspendedJobStacktrace(jobId));
// after
Job job = managementService.createSuspendedJobQuery().jobId(jobId).singleResult();
String trace = job != null && job.getExceptionMessage() != null
? rest.get(pathSuspendedJobStacktrace(jobId))
: null; Defensive patterns
Strategy: try-catch
Validate before calling
Job j = managementService.createSuspendedJobQuery().jobId(jobId).singleResult(); boolean safe = j != null && j.getExceptionMessage() != null;
Try / catch
try { String s = managementService.getSuspendedJobExceptionStacktrace(jobId); }
catch (FlowableObjectNotFoundException e) { /* suspended job has no recorded failure */ } Prevention
- Don't assume suspended == failed
- Check exceptionMessage via query first
- Treat missing stacktrace as informational
When it happens
Trigger: GET /cmmn-management/suspended-jobs/{jobId}-exception-stacktrace for a suspended job whose stored exception stacktrace is null — typically a job created by suspend-job operations that never threw.
Common situations: Inspecting all suspended jobs for failures; calling the endpoint on a freshly suspended job; assuming suspended implies failed.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Timer job with id '' doesn't have an exception stacktrace.
- Could not find a job with id ''.
- Job with id '${jobId}' does not have an exception stacktrace
- No job found with id
- Could not find a case instance with id '${caseInstanceId}'.
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/8c86ea550680e552.
Report an issue: GitHub.