flowable/flowable-engine · error · FlowableContentNotSupportedException

The provided body contains a serialized object for which…

Error message

The provided body contains a serialized object for which the class was not found: 

What it means

FlowableContentNotSupportedException wrapping a ClassNotFoundException thrown while deserializing an uploaded 'serializable' variable: the JVM reading the stream cannot resolve the object's class. Message includes the missing class name.

Solutions

  1. Deploy the serialized object's class (same package, serialVersionUID) to the Flowable server's classpath
  2. Prefer type='binary' or JSON to avoid Java serialization coupling between client and server
  3. Fix serialVersionUID mismatches by aligning class versions across client and server
  4. Upgrade/downgrade so client and server share the same library version producing the serialized class
Defensive patterns

Strategy: fallback

Validate before calling

// only upload classes the server actually has
Class.forName(className); // verify in a shared-module test before serializing

Try / catch

try { uploadSerializable(obj) } catch (FlowableContentNotSupportedException e) { serializeAsJsonOrBinaryInstead(); }

Prevention

When it happens

Trigger: type='serializable' upload where the serialized object's class is not on the Flowable server's classpath, or its serialVersionUID differs from the server's version of the class.

Common situations: Custom DTO serialized by a client app but never deployed to the server; class package renamed between client and server versions; serialVersionUID mismatch after refactoring.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/095e196b54b11d27. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/task/TaskVariableBaseResource.java:198

                setVariable(task, variableName, variableBytes, scope, isNew);

            } else if (isSerializableVariableAllowed) {
                // Try deserializing the object
                ObjectInputStream stream = new ObjectInputStream(file.getInputStream());
                Object value = stream.readObject();
                setVariable(task, variableName, value, scope, isNew);
                stream.close();

            } else {
                throw new FlowableContentNotSupportedException("Serialized objects are not allowed");
            }

            return getVariableFromRequestWithoutAccessCheck(task, variableName, scope.name(), false);

        } catch (IOException ioe) {
            throw new FlowableIllegalArgumentException("Error getting binary variable", ioe);
        } catch (ClassNotFoundException ioe) {
            throw new FlowableContentNotSupportedException("The provided body contains a serialized object for which the class was not found: " + ioe.getMessage());
        }

    }

    protected RestVariable setSimpleVariable(RestVariable restVariable, Task task, boolean isNew) {
        if (restVariable.getName() == null) {
            throw new FlowableIllegalArgumentException("Variable name is required");
        }

        // Figure out scope, revert to local is omitted
        RestVariableScope scope = restVariable.getVariableScope();
        if (scope == null) {
            scope = RestVariableScope.LOCAL;
        }

        Object actualVariableValue = restResponseFactory.getVariableValue(restVariable);
        setVariable(task, restVariable.getName(), actualVariableValue, scope, isNew);

View on GitHub (pinned to d6d39ce1c6)