apache/dubbo · error · RuntimeException
Missing method [{}] implement.
Error message
Missing method [{}] implement. What it means
Thrown by Mixin.mixin when an interface declares a method that none of the supplied delegate classes implement (findMethod returns -1). The message includes the method descriptor so you can see exactly which signature is missing. Because the generated class would not satisfy the interface, Dubbo fails fast with RuntimeException.
Source
Thrown at dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Mixin.java:149
}
}
ccp.addInterface(ics[i]);
for (Method method : ics[i].getMethods()) {
if ("java.lang.Object".equals(method.getDeclaringClass().getName())) {
continue;
}
String desc = ReflectUtils.getDesc(method);
if (worked.contains(desc)) {
continue;
}
worked.add(desc);
int ix = findMethod(dcs, desc);
if (ix < 0) {
throw new RuntimeException("Missing method [" + desc + "] implement.");
}
Class<?> rt = method.getReturnType();
String mn = method.getName();
if (Void.TYPE.equals(rt)) {
ccp.addMethod(
mn,
method.getModifiers(),
rt,
method.getParameterTypes(),
method.getExceptionTypes(),
"d" + ix + "." + mn + "($$);");
} else {
ccp.addMethod(
mn,
method.getModifiers(),
rt,
method.getParameterTypes(),View on GitHub (pinned to 3a3043227f)
Solutions
- Implement the missing method (matching the exact signature in the descriptor) as a public method on a delegate class.
- If the method exists but is private/static/protected, change it to public instance scope so getMethods() sees it.
- Add the new interface method to all delegates after upgrading the interface.
Example fix
// before
public class DelegateImpl implements Service {
public void a() {}
// b() missing
}
// after
public class DelegateImpl implements Service {
public void a() {}
public void b() {} // satisfy Service.b()
} Defensive patterns
Strategy: validation
Validate before calling
for (Class<?> dc : dcs) {
for (Method m : ics_to_check.getMethods()) {
boolean found = Arrays.stream(dc.getMethods())
.anyMatch(dm -> ReflectUtils.getDesc(dm).equals(ReflectUtils.getDesc(m)));
if (!found) { /* delegate is missing a required method */ }
}
} Prevention
- Make delegates implement the full interface (use `implements Iface` so the compiler enforces it).
- Keep required methods public and non-static so reflection sees them.
- Re-run Mixin.mixin in a unit test whenever the interface changes.
When it happens
Trigger: Mixin.mixin(ics, dcs) where a delegate class omits a public method required by one of the interfaces; the delegate has the method but it is private/static so it is not returned by getMethods().
Common situations: A delegate that implements only part of an interface; a delegate whose required method is package-private or static and thus invisible to reflection; an interface that gained a new method after the delegate was compiled.
Related errors
- Class {} is not a interface.
- non-public interfaces class from different packages
- non-public delegate class from different packages
- {} is not a interface.
- interface limit exceeded
AI-assisted analysis of apache/dubbo@3a3043227f (2026-08-14).
Data as JSON: /api/errors/552cf8077cb10585.
Report an issue: GitHub.