apache/skywalking · error · IllegalArgumentException
Unsupported value type: {}
Error message
Unsupported value type: {} What it means
Thrown by FilterExpression's value-conversion helper (used when the OAL visitor turns a literal into a FilterValue) when the parsed value object is not one of the supported types: Integer/Long, Double/Float, String, Boolean, List, or an already-converted FilterValue. Any other runtime type reaching this branch aborts filter construction.
Source
Thrown at oap-server/oal-rt/src/main/java/org/apache/skywalking/oal/v2/model/FilterExpression.java:94
}
private static FilterValue convertToFilterValue(Object value) {
if (value == null) {
return FilterValue.ofNull();
} else if (value instanceof Long || value instanceof Integer) {
return FilterValue.ofNumber(((Number) value).longValue());
} else if (value instanceof Double || value instanceof Float) {
return FilterValue.ofNumber(((Number) value).doubleValue());
} else if (value instanceof String) {
return FilterValue.ofString((String) value);
} else if (value instanceof Boolean) {
return FilterValue.ofBoolean((Boolean) value);
} else if (value instanceof List) {
return FilterValue.ofArray((List<?>) value);
} else if (value instanceof FilterValue) {
return (FilterValue) value;
} else {
throw new IllegalArgumentException("Unsupported value type: " + value.getClass());
}
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FilterExpression that = (FilterExpression) o;
return Objects.equals(fieldName, that.fieldName) &&
operator == that.operator &&
Objects.equals(value, that.value);
}
@Override
public int hashCode() {
return Objects.hash(fieldName, operator, value);
}
View on GitHub (pinned to 102af09b4a)
Solutions
- Use only the supported literal kinds in OAL filters: numbers, quoted strings, booleans, and in(...) lists
- If you extended the grammar, add a branch in the conversion for your new literal type producing an appropriate FilterValue.ofNumber/ofString/ofBoolean/ofArray
- Run a full clean rebuild (mvnw clean install) so grammar-generated visitor code and oal-rt stay consistent
Example fix
// before (OAL, unsupported null literal) from ServiceTraffic where attr = null --> svcNull // after: drop the null comparison or handle it via a supported operator/value from ServiceTraffic where attr != 'x' --> svcOther
Defensive patterns
Strategy: type-guard
Type guard
boolean isSupportedFilterValue(Object v) {
return v instanceof Number || v instanceof String || v instanceof Boolean
|| v instanceof List || v instanceof FilterValue;
} Try / catch
In grammar-extension work, catch IllegalArgumentException at the visitor boundary and rethrow with the offending token/context so users see which literal was rejected.
Prevention
- Stick to number/string/boolean/in-list literals in OAL filters
- After touching oal-grammar or oal-rt, run a full clean build and the OAL RT unit tests so model and visitor stay in sync
When it happens
Trigger: An OAL filter literal that the ANTLR visitor produces as an unsupported object type — e.g. a null literal, a map literal, or a custom visitor return value; typically only possible when the grammar/visitor is extended or when a new literal kind is added without extending this conversion.
Common situations: Extending the OAL grammar with new literal forms (maps, nulls) without updating FilterExpression conversion; contributing a patch to the visitor that returns raw parser context objects; version skew between grammar and oal-rt after a partial rebuild.
Related errors
- filter expression [{}] not found
- Unknown filter value type: {}
- Unsupported number operator: {}
- Unsupported string operator: {}
- Unsupported enum operator: {}
AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14).
Data as JSON: /api/errors/c89ca1543fc752db.
Report an issue: GitHub.