diff --git a/server/src/com/cloud/api/ApiDispatcher.java b/server/src/com/cloud/api/ApiDispatcher.java index 771e2f563e6..2a0540d19f3 100644 --- a/server/src/com/cloud/api/ApiDispatcher.java +++ b/server/src/com/cloud/api/ApiDispatcher.java @@ -151,6 +151,10 @@ public class ApiDispatcher { setupParameters(cmd, params); Implementation impl = cmd.getClass().getAnnotation(Implementation.class); + if (impl == null) { + throw new CloudRuntimeException("Unable to execute command " + cmd.getClass().getName() + ", no implementation specified."); + } + String methodName = impl.method(); Object mgr = _mgmtServer; switch (impl.manager()) {