flowable/flowable-engine · error · FlowableException
Unexpected exception getting variable data
Error message
Unexpected exception getting variable data
What it means
Generic FlowableException wrapping an unexpected IOException raised while serializing the variable value to bytes for the /data endpoint (e.g. object not actually serializable at write time or stream failure). It is a catch-all conversion of the underlying java.io.IOException.
Source
Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/variable/VariableInstanceDataResource.java:75
result = (byte[]) variable.getValue();
response.setContentType("application/octet-stream");
} else if (CmmnRestResponseFactory.SERIALIZABLE_VARIABLE_TYPE.equals(variable.getType())) {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ObjectOutputStream outputStream = new ObjectOutputStream(buffer);
outputStream.writeObject(variable.getValue());
outputStream.close();
result = buffer.toByteArray();
response.setContentType("application/x-java-serialized-object");
} else {
throw new FlowableObjectNotFoundException("The variable does not have a binary data stream.", null);
}
return result;
} catch (IOException ioe) {
// Re-throw IOException
throw new FlowableException("Unexpected exception getting variable data", ioe);
}
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Inspect the wrapped IOException cause in server logs for the real failure (NotSerializableException, ClassNotFoundException)
- Make the variable's value type implement java.io.Serializable with a stable serialVersionUID and serializable fields
- Fix server classpath so classes referenced by stored serialized objects are available
- If only the value is needed, use the plain variable endpoint instead of binary /data
Defensive patterns
Strategy: try-catch
Try / catch
try { return fetchVariableData(id); } catch (FlowableException e) { Throwable cause = e.getCause(); if (cause instanceof IOException) { log.error("variable data serialization failed", cause); } throw e; } Prevention
- Ensure variable values implement Serializable with stable serialVersionUID
- Keep classes referenced by serialized variables on the server classpath
- Inspect the wrapped IOException cause for the root failure
When it happens
Trigger: GET /cmmn-runtime/variable-instances/{id}/data where outputStream.writeObject(value) throws IOException - typically a variable value that is not Serializable despite reaching the serialization branch, or an in-memory buffer/IO failure.
Common situations: Custom variable types missing serialVersionUID or holding non-serializable fields; class of a stored serializable object missing on the server so writeObject/readObject fails; environment/IO problems on the server.
Understand the failure class
Background: json.Marshal / "failed to marshal" errors in Go: why "unsupported type" happens and how to fix it — this error's family across 22 libraries.
Related errors
- Unexpected exception getting variable data
- Unexpected exception getting variable data
- Error getting variable " + variableName
- Unexpected error getting variable data
- Unexpected exception getting variable data
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/243ceeaf7c0ca435.
Report an issue: GitHub.