flowable/flowable-engine · error · NullPointerException
error.value.notype
Error message
error.value.notype
What it means
ObjectValueExpression wraps a plain object plus the expected type for a deferred EL expression. The constructor throws a NullPointerException (with message 'error.value.notype') when the expected type parameter is null, because a wrapped object expression must declare the type it will coerce to.
Source
Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/ObjectValueExpression.java:50
private final TypeConverter converter;
private final Object object;
private final Class<?> type;
/**
* Wrap an object into a value expression.
* @param converter type converter
* @param object the object to wrap
* @param type the expected type this object will be coerced in {@link #getValue(ELContext)}.
*/
public ObjectValueExpression(TypeConverter converter, Object object, Class<?> type) {
super();
this.converter = converter;
this.object = object;
this.type = type;
if (type == null) {
throw new NullPointerException(LocalMessages.get("error.value.notype"));
}
}
/**
* Two object value expressions are equal if and only if their wrapped objects are equal.
*/
@Override
public boolean equals(Object obj) {
if (obj != null && obj.getClass() == getClass()) {
ObjectValueExpression other = (ObjectValueExpression)obj;
if (type != other.type) {
return false;
}
return object == other.object || object != null && object.equals(other.object);
}
return false;
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Pass a concrete Class object as the expected type, e.g. String.class or Object.class if the type is unknown.
- If the expected type is computed, default it to Object.class when null before constructing.
- Inspect the caller supplying the type (often a framework bridge) and fix where the type is lost.
Example fix
// before new ObjectValueExpression(converter, object, null) // after new ObjectValueExpression(converter, object, expectedType != null ? expectedType : Object.class)
Defensive patterns
Strategy: validation
Validate before calling
if (expectedType == null) {
throw new IllegalArgumentException("expected type required for ObjectValueExpression");
}
new ObjectValueExpression(converter, object, expectedType); Type guard
boolean validObjectValueExpressionArgs(Object object, Class<?> type) {
return type != null;
} Try / catch
try {
new ObjectValueExpression(converter, object, type);
} catch (NullPointerException e) {
// type was null; supply a default
} Prevention
- Always pass a non-null Class as the expected type; default to Object.class when unknown.
- Validate framework-bridge code that derives the type from generics/reflection.
- Add an assert or precondition before constructing wrapped-object expressions.
When it happens
Trigger: Calling new ObjectValueExpression(converter, object, type) with type == null.
Common situations: Frameworks integrating the EL implementation (e.g. custom ValueExpression factories, CDI/JSF-like integration) passing a null expected type obtained from an untyped API or an unset generic type.
Related errors
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/5b627e30e6025506.
Report an issue: GitHub.