apache/skywalking · error · IllegalArgumentException

Cannot resolve {desc} — no matching codegen path. Parser typ

Error message

Cannot resolve {desc} — no matching codegen path. Parser type: {parserType}, inputType: {inputTypeName}

What it means

Generic catch-all thrown at LAL compile time when the value codegen cannot map an expression onto any known path: it is not a local def variable, not a literal, not tag()/sourceAttribute(), not a parsed.*/log.* chain, and not a parenthesized expression. The code fails fast at boot instead of silently generating null-producing Java. The message includes the parser type and input type to explain which resolution paths were available.

Source

Thrown at oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/compiler/LALValueCodegen.java:842

        // Check for def variable reference
        if (!value.getSegments().isEmpty()) {
            final String primaryName = value.getSegments().get(0);
            final LALClassGenerator.LocalVarInfo localVar =
                genCtx.localVars.get(primaryName);
            if (localVar != null) {
                LALDefCodegen.generateDefVarChain(sb, localVar, chain, genCtx);
                return;
            }
        }

        // No matching codegen path — fail at compile time instead of silently
        // generating null.
        if (chain.isEmpty()) {
            final String desc = value.getFunctionCallName() != null
                ? "function call '" + value.getFunctionCallName() + "(...)'"
                : "expression '" + value.getSegments() + "'";
            throw new IllegalArgumentException(
                "Cannot resolve " + desc + " — no matching codegen path. "
                    + "Parser type: " + genCtx.parserType
                    + (genCtx.inputType != null
                        ? ", inputType: " + genCtx.inputType.getName() : ""));
        }
        // Treat as parsed ref
        generateParsedAccess(sb, chain, genCtx);
    }

    // ==================== Parenthesized expression ====================

    /**
     * Generates code for a parenthesized expression with optional type cast
     * and method chain.
     *
     * <p>LAL: {@code (parsed.component as String).trim()}
     * <br>Generated: {@code h.toStr(h.mapVal("component")).trim()}
     */

View on GitHub (pinned to 102af09b4a)

Solutions

  1. Check the function name in the message against the supported set: tag(), sourceAttribute(), json()/yaml()/text() parsers, toJson()/toJsonArray(), and def-variable references
  2. If the identifier is meant to be a variable, declare it first with def name = ...
  3. For field access, qualify the root explicitly as parsed.* or log.*
  4. For JSON path extraction, use json{...} parser plus parsed.* or toJson(...) on a string

Example fix

# before
filter {
  extractor {
    service jsonPath("$.svc")
  }
}

# after
filter {
  json { }
  extractor {
    service parsed.svc as String
  }
}
Defensive patterns

Strategy: validation

Prevention

When it happens

Trigger: Calling an unknown or misspelled function (e.g. jsonPath("x"), regexp("x") instead of the supported built-ins); using a bare identifier that was never declared with def; a function call whose name matches none of the codegen branches for the current parser type.

Common situations: Misspelling a built-in function; assuming a v1 Groovy feature exists in the v2 compiler; referencing an identifier defined in another rule or outside the extractor; using a function only valid in a different parser context (e.g. h.group(...) TEXT-only helpers).

Related errors


AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14). Data as JSON: /api/errors/2902574bf7c0e7dd. Report an issue: GitHub.