pinpoint-apm/pinpoint · error · IllegalArgumentException

Not found field. name=${fieldName}

Error message

Not found field. name=${fieldName}

What it means

Thrown by ASMClass.addGetter when the target class does not contain a field with the requested name. It fires when a plugin calls addGetter with a fieldName that was never declared (or not yet added via addField) on the instrumented class, so bytecode instrumentation cannot generate a getter against a nonexistent field. The input at fault is the fieldName argument; callers should ensure addField (or the target's own definition) declares the field before requesting a getter, and wrap the call in error handling for InstrumentException.

Source

Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMClass.java:302

                setModified(true);
            } else if (logger.isDebugEnabled()) {
                logger.debug("Skip addField, accessor already declared. class={}, accessor={}", getName(), accessorTypeName);
            }
        } catch (Exception e) {
            throw new InstrumentException("Failed to add field with accessor [" + accessorClass.getName() + "]. Cause:" + e.getMessage(), e);
        }
    }

    @Override
    public void addGetter(Class<?> getterClass, String fieldName) throws InstrumentException {
        Objects.requireNonNull(getterClass, "getterClass");
        Objects.requireNonNull(fieldName, "fieldName");

        try {
            final GetterAnalyzer.GetterDetails getterDetails = GetterAnalyzer.instance().analyze(getterClass);
            final ASMFieldNodeAdapter fieldNode = this.classNode.getField(fieldName, null);
            if (fieldNode == null) {
                throw new IllegalArgumentException("Not found field. name=" + fieldName);
            }
            Type fieldType = getterDetails.getFieldType();
            if (!fieldNode.getJavaType().equals(fieldType)) {
                throw new IllegalArgumentException("different return type. return=" + fieldType + ", field=" + fieldNode.getJavaType());
            }

            boolean modified = this.classNode.addGetterMethod(getterDetails.getGetter().getName(), fieldNode);
            modified |= this.classNode.addInterface(getterClass.getName());
            if (modified) {
                setModified(true);
            } else if (logger.isDebugEnabled()) {
                logger.debug("Skip addGetter, getter already declared. class={}, getter={}", getName(), getterClass.getName());
            }
        } catch (Exception e) {
            throw new InstrumentException("Failed to add getter: " + getterClass.getName(), e);
        }
    }

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Use the actual field name declared on the target class
  2. Check spelling/case of fieldName in the plugin's getter binding
  3. Ensure the field exists before addGetter is invoked
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMClass.java:302 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/ef4b521a442696b4. Report an issue: GitHub.