apache/skywalking · error · IllegalArgumentException
{slot} value '{numText}' exceeds the supported range (must f
Error message
{slot} value '{numText}' exceeds the supported range (must fit in a Java long) What it means
Thrown from the MeterSystem constructor during function discovery: a class annotated with @MeterFunction does not implement AcceptableValue. Every meter function must be an AcceptableValue implementation so the meter pipeline can feed values into it; the scan enforces this contract at boot and fails fast.
Source
Thrown at oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/compiler/LALScriptParser.java:894
* which share the lexer NUMBER token with arithmetic expressions but
* cannot accept the suffixes/forms supported there. Throws a clear
* compile-time error for shape violations and for values that exceed
* Java's {@code long} range (rather than letting
* {@link NumberFormatException} leak from {@code Long.parseLong}).
*/
private static long parseStrictInteger(final String numText, final String slot) {
for (int i = 0; i < numText.length(); i++) {
final char c = numText.charAt(i);
if (c < '0' || c > '9') {
throw new IllegalArgumentException(
slot + " expects a plain integer literal, got '" + numText
+ "' (suffixes / decimals / exponents are not accepted here)");
}
}
try {
return Long.parseLong(numText);
} catch (NumberFormatException e) {
throw new IllegalArgumentException(
slot + " value '" + numText + "' exceeds the supported range "
+ "(must fit in a Java long)");
}
}
/**
* Like {@link #parseStrictInteger} but additionally requires the value
* to fit in a Java {@code int}. Used by the {@code [index]} grammar
* slot, where silent narrowing of an oversized literal would wrap to a
* negative index instead of producing a clear error.
*/
private static int parseStrictInt(final String numText, final String slot) {
final long value = parseStrictInteger(numText, slot);
if (value < Integer.MIN_VALUE || value > Integer.MAX_VALUE) {
throw new IllegalArgumentException(
slot + " value '" + numText + "' exceeds the supported range "
+ "(must fit in a Java int)");
}View on GitHub (pinned to 102af09b4a)
Solutions
- Make the annotated class implement AcceptableValue<T> (and normally extend the Dispatcher/MeterFunction base used by shipped functions)
- Verify the annotation sits on the function class itself, not on a helper or config class
- Recompile the custom plugin against the OAP server-core version actually deployed
Example fix
// before
@MeterFunction(functionName = "my_func")
class MyFunc { } // doesn't implement AcceptableValue
// after
@MeterFunction(functionName = "my_func")
class MyFunc implements AcceptableValue<Long> { ... } Defensive patterns
Strategy: type-guard
Type guard
boolean validFunction = cls.isAnnotationPresent(MeterFunction.class)
&& org.apache.skywalking.oap.server.core.analysis.meter.function.AcceptableValue.class.isAssignableFrom(cls); Prevention
- Every @MeterFunction class must implement AcceptableValue<T>
- Run OAP boot in a staging environment with custom plugins before production
When it happens
Trigger: Deploying a custom jar on the OAP classpath under org.apache.skywalking that carries @MeterFunction on a class not implementing AcceptableValue. Standard shipped functions all implement it, so this only fires with custom/patched meter function classes.
Common situations: Writing a custom MAL function and annotating the dispatcher class but putting the annotation on the wrong class; copying an existing function and stripping the interface; version-mismatched custom plugin compiled against an older API.
Related errors
- tag() requires exactly one string literal argument, e.g. tag
- Unsupported extractor statement in LAL rule at line {sourceL
- {slot} value '{numText}' exceeds the supported range (must f
- Unclosed interpolation in: {s}
- Cannot parse interpolation expression: {expr}
AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14).
Data as JSON: /api/errors/ea3e8e07724d33bd.
Report an issue: GitHub.