{"record":{"id":"bdeb70cb7d771d57","repo":"pinpoint-apm/pinpoint","slug":"failed-to-add-getter-getterclassname","errorCode":null,"errorMessage":"Failed to add getter: ${getterClassName}","messagePattern":"Failed to add getter: (.+?)","errorType":"exception","errorClass":"InstrumentException","httpStatus":null,"severity":"error","filePath":"agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMClass.java","lineNumber":317,"sourceCode":"            final GetterAnalyzer.GetterDetails getterDetails = GetterAnalyzer.instance().analyze(getterClass);\n            final ASMFieldNodeAdapter fieldNode = this.classNode.getField(fieldName, null);\n            if (fieldNode == null) {\n                throw new IllegalArgumentException(\"Not found field. name=\" + fieldName);\n            }\n            Type fieldType = getterDetails.getFieldType();\n            if (!fieldNode.getJavaType().equals(fieldType)) {\n                throw new IllegalArgumentException(\"different return type. return=\" + fieldType + \", field=\" + fieldNode.getJavaType());\n            }\n\n            boolean modified = this.classNode.addGetterMethod(getterDetails.getGetter().getName(), fieldNode);\n            modified |= this.classNode.addInterface(getterClass.getName());\n            if (modified) {\n                setModified(true);\n            } else if (logger.isDebugEnabled()) {\n                logger.debug(\"Skip addGetter, getter already declared. class={}, getter={}\", getName(), getterClass.getName());\n            }\n        } catch (Exception e) {\n            throw new InstrumentException(\"Failed to add getter: \" + getterClass.getName(), e);\n        }\n    }\n\n    @Override\n    public void addSetter(Class<?> setterClass, String fieldName) throws InstrumentException {\n        this.addSetter(setterClass, fieldName, false);\n    }\n\n    @Override\n    public void addSetter(Class<?> setterClass, String fieldName, boolean removeFinal) throws InstrumentException {\n        Objects.requireNonNull(setterClass, \"setterClass\");\n        try {\n            final SetterAnalyzer.SetterDetails setterDetails = SetterAnalyzer.instance().analyze(setterClass);\n            final ASMFieldNodeAdapter fieldNode = this.classNode.getField(fieldName, null);\n            if (fieldNode == null) {\n                throw new IllegalArgumentException(\"Not found field. name=\" + fieldName);\n            }\n","sourceCodeStart":299,"sourceCodeEnd":335,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMClass.java#L299-L335","documentation":"Catch-all guard in ASMClass.addGetter: an unexpected exception during getter analysis or bytecode generation is wrapped as InstrumentException with the getter class name; the underlying cause is chained.","triggerScenarios":"Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMClass.java:317 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the chained cause for the real failure (analysis error or ASM error)","Verify the getter class follows the expected getter convention","Upgrade the profiler/agent version for instrumentation fixes"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}