{"record":{"id":"5ac750c1b6a8357b","repo":"pinpoint-apm/pinpoint","slug":"signature-miss-match-method-methodname-source","errorCode":null,"errorMessage":"Signature miss match. method=${methodName}, source=${sourceDesc}, advice=${adviceDesc}","messagePattern":"Signature miss match\\. method=(.+?), source=(.+?), advice=(.+?)","errorType":"exception","errorClass":"InstrumentException","httpStatus":null,"severity":"error","filePath":"agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMAspectWeaver.java","lineNumber":117,"sourceCode":"\n            classNode.copyMethod(methodNode);\n        }\n    }\n\n    private void copyPointCutMethods(final MethodNodes methodNodes, final ASMClassNodeAdapter classNode) throws InstrumentException {\n        final ASMMethodInsnNodeRemapper.Builder remapBuilder = new ASMMethodInsnNodeRemapper.Builder();\n        for (ASMMethodNodeAdapter joinPointMethodNode : methodNodes.jointPoints) {\n            remapBuilder.addFilter(null, joinPointMethodNode.getName(), joinPointMethodNode.getDesc());\n        }\n\n        for (ASMMethodNodeAdapter pointCutMethodNode : methodNodes.pointCuts) {\n            final ASMMethodNodeAdapter sourceMethodNode = classNode.getDeclaredMethod(pointCutMethodNode.getName(), pointCutMethodNode.getDesc());\n            if (sourceMethodNode == null) {\n                throw new InstrumentException(\"not found method. \" + classNode.getInternalName() + \".\" + pointCutMethodNode.getName());\n            }\n\n            if (!sourceMethodNode.getDesc().equals(pointCutMethodNode.getDesc())) {\n                throw new InstrumentException(\"Signature miss match. method=\" + pointCutMethodNode.getName() + \", source=\" + sourceMethodNode.getDesc() + \", advice=\" + pointCutMethodNode.getDesc());\n            }\n\n            if (logger.isInfoEnabled()) {\n                logger.info(\"weaving method={}{}\", sourceMethodNode.getName(), sourceMethodNode.getDesc());\n            }\n\n            // rename.\n            final String methodName = this.methodNameReplacer.replaceMethodName(sourceMethodNode.getName());\n            sourceMethodNode.rename(methodName);\n            // set private.\n            sourceMethodNode.setAccess(sourceMethodNode.getAccess() & -6 | Opcodes.ACC_PRIVATE);\n            // copy.\n            classNode.copyMethod(pointCutMethodNode);\n\n            // remap\n            final ASMMethodNodeAdapter newMethodNode = classNode.getDeclaredMethod(pointCutMethodNode.getName(), pointCutMethodNode.getDesc());\n            if (newMethodNode == null) {\n                throw new InstrumentException(\"not found new method. \" + classNode.getInternalName() + \".\" + pointCutMethodNode.getName());","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMAspectWeaver.java#L99-L135","documentation":"When copying a pointcut method, the source method's descriptor (parameter/return types in JVM internal form) must exactly equal the advice pointcut method's descriptor. A mismatch means the join point's signature changed, and weaving would produce invalid bytecode, so InstrumentException is thrown showing both descriptors.","triggerScenarios":"Source class method with the matching name has a different parameter list or return type than the advice's pointcut method — e.g. a dependency upgrade changed the intercepted method's signature.","commonSituations":"Library upgrade added/changed parameters of the intercepted method; advice compiled against an older API version; generics/boxing differences in the declared descriptor.","solutions":["Update the advice pointcut method signature to match the new source descriptor","Pin the target library to the version matching the advice's expected signature","Regenerate the advice class for the upgraded target version","Compare descriptors with javap to see the exact type difference"],"exampleFix":"// before\npublic void interceptor_before(Object arg1) { ... }\n// after\npublic void interceptor_before(Object arg1, Object arg2) { ... }","handlingStrategy":"validation","validationCode":"ASMMethodNodeAdapter src = sourceClassNode.getDeclaredMethod(name, desc);\nif (src != null && !src.getDesc().equals(adviceDesc)) { throw new IllegalArgumentException(\"signature drift on \" + name); }","typeGuard":null,"tryCatchPattern":"try { weaver.weaving(src, adv); } catch (InstrumentException e) { if (e.getMessage().startsWith(\"Signature miss match\")) { logger.error(\"update advice signature: {}\", e.getMessage()); } }","preventionTips":["Re-check advice signatures after every target library upgrade","Compare descriptors with javap","Write integration tests that exercise weaving at agent startup"],"tags":["java","bytecode","aspect","signature-mismatch"],"backgroundTag":"signature-mismatch","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}