{"record":{"id":"2902574bf7c0e7dd","repo":"apache/skywalking","slug":"cannot-resolve-desc-no-matching-codegen-path","errorCode":null,"errorMessage":"Cannot resolve {desc} — no matching codegen path. Parser type: {parserType}, inputType: {inputTypeName}","messagePattern":"Cannot resolve (.+?) — no matching codegen path\\. Parser type: (.+?), inputType: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/compiler/LALValueCodegen.java","lineNumber":842,"sourceCode":"\n        // Check for def variable reference\n        if (!value.getSegments().isEmpty()) {\n            final String primaryName = value.getSegments().get(0);\n            final LALClassGenerator.LocalVarInfo localVar =\n                genCtx.localVars.get(primaryName);\n            if (localVar != null) {\n                LALDefCodegen.generateDefVarChain(sb, localVar, chain, genCtx);\n                return;\n            }\n        }\n\n        // No matching codegen path — fail at compile time instead of silently\n        // generating null.\n        if (chain.isEmpty()) {\n            final String desc = value.getFunctionCallName() != null\n                ? \"function call '\" + value.getFunctionCallName() + \"(...)'\"\n                : \"expression '\" + value.getSegments() + \"'\";\n            throw new IllegalArgumentException(\n                \"Cannot resolve \" + desc + \" — no matching codegen path. \"\n                    + \"Parser type: \" + genCtx.parserType\n                    + (genCtx.inputType != null\n                        ? \", inputType: \" + genCtx.inputType.getName() : \"\"));\n        }\n        // Treat as parsed ref\n        generateParsedAccess(sb, chain, genCtx);\n    }\n\n    // ==================== Parenthesized expression ====================\n\n    /**\n     * Generates code for a parenthesized expression with optional type cast\n     * and method chain.\n     *\n     * <p>LAL: {@code (parsed.component as String).trim()}\n     * <br>Generated: {@code h.toStr(h.mapVal(\"component\")).trim()}\n     */","sourceCodeStart":824,"sourceCodeEnd":860,"githubUrl":"https://github.com/apache/skywalking/blob/102af09b4a56064e22050dded10e2c52e490d040/oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/compiler/LALValueCodegen.java#L824-L860","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["Check the function name in the message against the supported set: tag(), sourceAttribute(), json()/yaml()/text() parsers, toJson()/toJsonArray(), and def-variable references","If the identifier is meant to be a variable, declare it first with def name = ...","For field access, qualify the root explicitly as parsed.* or log.*","For JSON path extraction, use json{...} parser plus parsed.* or toJson(...) on a string"],"exampleFix":"# before\nfilter {\n  extractor {\n    service jsonPath(\"$.svc\")\n  }\n}\n\n# after\nfilter {\n  json { }\n  extractor {\n    service parsed.svc as String\n  }\n}","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Declare every variable with def before use","Qualify roots explicitly (parsed.*, log.*, tag(), sourceAttribute())","Prefer compiling rules in a staging test before deploying (dsl-scripts-test harness)"],"tags":["lal","log-analyzer","compiler","expression"],"backgroundTag":null,"analyzedSha":"102af09b4a56064e22050dded10e2c52e490d040","analyzedAt":"2026-08-14T10:47:52.647Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}