{"record":{"id":"2b3066a24f42bb27","repo":"apache/skywalking","slug":"cannot-resolve-field-getter-simplename-fieldnam","errorCode":null,"errorMessage":"Cannot resolve field/getter {simpleName}.{fieldName} in def variable chain","messagePattern":"Cannot resolve field/getter (.+?)\\.(.+?) in def variable chain","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/LALDefCodegen.java","lineNumber":311,"sourceCode":"                    canBeNull = !returnType.isPrimitive();\n                }\n            } else if (seg instanceof LALScriptModel.FieldSegment) {\n                final LALScriptModel.FieldSegment fs =\n                    (LALScriptModel.FieldSegment) seg;\n                final String fieldName = fs.getName();\n                // Try getter first\n                final String getterName = \"get\"\n                    + Character.toUpperCase(fieldName.charAt(0))\n                    + fieldName.substring(1);\n                Method getter = null;\n                try {\n                    getter = currentType.getMethod(getterName);\n                } catch (NoSuchMethodException e) {\n                    // Try direct field access name\n                    try {\n                        getter = currentType.getMethod(fieldName);\n                    } catch (NoSuchMethodException e2) {\n                        throw new IllegalArgumentException(\n                            \"Cannot resolve field/getter \"\n                                + currentType.getSimpleName()\n                                + \".\" + fieldName + \" in def variable chain\");\n                    }\n                }\n                final Class<?> returnType = getter.getReturnType();\n\n                if (fs.isSafeNav() && canBeNull) {\n                    if (isLast && returnType.isPrimitive()) {\n                        final String boxName =\n                            LALCodegenHelper.boxTypeName(returnType);\n                        prevExpr = \"(\" + prevExpr + \" == null ? null : \"\n                            + boxName + \".valueOf(\" + prevExpr + \".\"\n                            + getter.getName() + \"()))\";\n                        currentType = returnType;\n                    } else {\n                        prevExpr = \"(\" + prevExpr + \" == null ? null : \"\n                            + prevExpr + \".\" + getter.getName() + \"())\";","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/apache/skywalking/blob/102af09b4a56064e22050dded10e2c52e490d040/oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/v2/compiler/LALDefCodegen.java#L293-L329","documentation":"Thrown by TimeBucket.retainToDayLastMin4MinuteBucket(long) when the argument fails isMinuteBucket — not a 12-digit yyyyMMddHHmm value. This variant pins HHmm to 2359 (last minute of the day) for end-of-day rollups; like its sibling it accepts minute buckets only.","triggerScenarios":"Calling retainToDayLastMin4MinuteBucket with a day/second bucket or an epoch timestamp instead of a minute bucket; commonly hit in TTL or aggregation code that switched bucket precision between versions.","commonSituations":"Rollup/TTL pipelines fed with hour-precision buckets after a refactor; test fixtures with plausible-looking but wrong-digit longs; data replays from systems that store buckets as epoch millis.","solutions":["Pre-validate with TimeBucket.isMinuteBucket and reject/convert non-minute inputs before the call","Regenerate the correct precision with TimeBucket.getTimeBucket(timestamp, DownSampling.Minute) when starting from a raw timestamp","Check the upstream producer of the bucket (storage column, metric stream) for precision mismatches"],"exampleFix":"// before\nlong endOfDay = TimeBucket.retainToDayLastMin4MinuteBucket(bucket); // throws if not minute\n// after\nlong endOfDay = TimeBucket.isMinuteBucket(bucket)\n    ? TimeBucket.retainToDayLastMin4MinuteBucket(bucket)\n    : TimeBucket.retainToDayLastMin4MinuteBucket(\n          TimeBucket.getTimeBucket(System.currentTimeMillis(), DownSampling.Minute));","handlingStrategy":"validation","validationCode":"if (TimeBucket.isMinuteBucket(minuteTimeBucket)) { long lastMin = TimeBucket.retainToDayLastMin4MinuteBucket(minuteTimeBucket); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate precision before end-of-day rollup conversions","When refactoring bucket precision, grep all TimeBucket.retain* call sites"],"tags":["skywalking","oap","time-bucket","validation"],"backgroundTag":null,"analyzedSha":"102af09b4a56064e22050dded10e2c52e490d040","analyzedAt":"2026-08-14T10:47:52.647Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}