{"record":{"id":"99b9eaf2054eb97d","repo":"apache/skywalking","slug":"lal-script-parsing-failed-errors-in-script-ds","errorCode":null,"errorMessage":"LAL script parsing failed: {errors} in script: {dsl}","messagePattern":"LAL script parsing failed: (.+?) in script: (.+?)","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/LALScriptParser.java","lineNumber":107,"sourceCode":"        final LALParser parser = new LALParser(tokens);\n\n        final List<String> errors = new ArrayList<>();\n        parser.removeErrorListeners();\n        parser.addErrorListener(new BaseErrorListener() {\n            @Override\n            public void syntaxError(final Recognizer<?, ?> recognizer,\n                                    final Object offendingSymbol,\n                                    final int line,\n                                    final int charPositionInLine,\n                                    final String msg,\n                                    final RecognitionException e) {\n                errors.add(line + \":\" + charPositionInLine + \" \" + msg);\n            }\n        });\n\n        final LALParser.RootContext tree = parser.root();\n        if (!errors.isEmpty()) {\n            throw new IllegalArgumentException(\n                \"LAL script parsing failed: \" + String.join(\"; \", errors)\n                    + \" in script: \" + truncate(dsl, 200));\n        }\n\n        final List<FilterStatement> stmts = visitFilterContent(\n            tree.filterBlock().filterContent());\n        return new LALScriptModel(stmts);\n    }\n\n    // ==================== Filter content ====================\n\n    private static List<FilterStatement> visitFilterContent(\n            final LALParser.FilterContentContext ctx) {\n        final List<FilterStatement> stmts = new ArrayList<>();\n        for (final LALParser.FilterStatementContext fsc : ctx.filterStatement()) {\n            stmts.add(visitFilterStatement(fsc));\n        }\n        return stmts;","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/apache/skywalking/blob/102af09b4a56064e22050dded10e2c52e490d040/oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/compiler/LALScriptParser.java#L89-L125","documentation":"Thrown by ProcessDetectType.valueOf(int) when the integer has no mapping in the enum dictionary (currently DEFINITE=0 and LANGUAGE_AGENT=1). ProcessDetectType distinguishes how a process was discovered (definite detection vs. language-agent report); the int is persisted and transmitted, so an out-of-range value means unknown or corrupt data.","triggerScenarios":"Deserializing a Process record or protocol payload whose detect type field is 2+, or decoding storage data written by an incompatible version; also direct calls like ProcessDetectType.valueOf(99).","commonSituations":"Version skew between agent protocol and OAP (a newer agent sends a new detect type the older OAP doesn't know); corrupted storage rows; test fixtures using made-up ints.","solutions":["Validate the int against known values (0/1) before calling valueOf, and default or reject on unknown","Align agent and OAP versions so the protocol enum sets match","For corrupt storage rows, re-ingest or patch the process data"],"exampleFix":"// before\nProcessDetectType t = ProcessDetectType.valueOf(rawInt); // throws on 2+\n// after\nProcessDetectType t = rawInt == ProcessDetectType.DEFINITE.value()\n    ? ProcessDetectType.DEFINITE : ProcessDetectType.LANGUAGE_AGENT;","handlingStrategy":"validation","validationCode":"boolean known = rawInt == ProcessDetectType.DEFINITE.value() || rawInt == ProcessDetectType.LANGUAGE_AGENT.value();","typeGuard":null,"tryCatchPattern":"try { type = ProcessDetectType.valueOf(v); } catch (UnexpectedException e) { type = ProcessDetectType.DEFINITE; log.warn(\"unknown ProcessDetectType {}\", v); }","preventionTips":["Validate protocol ints at ingestion boundaries","Keep agent and OAP versions aligned"],"tags":["skywalking","oap","process","enum","data-corruption"],"backgroundTag":null,"analyzedSha":"102af09b4a56064e22050dded10e2c52e490d040","analyzedAt":"2026-08-14T10:47:52.647Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}