quarkusio/quarkus · error · IllegalStateException
Unable to find a concrete handleRequest method on handler cl
Error message
Unable to find a concrete handleRequest method on handler class <handlerClass.name()>
What it means
Thrown by RequestHandlerJandexUtil.discoverHandlerMethod when the handler class found in the Jandex index does not expose a concrete handleRequest method to wire the Lambda entry point to. The util walks the class hierarchy (up to java.lang.Object and collection-based supertypes) looking for the RequestHandler.handleRequest implementation; if every candidate is abstract or absent, there is no method the generated Lambda glue code can call, so the build aborts with the offending class name.
Source
Thrown at extensions/amazon-lambda/deployment/src/main/java/io/quarkus/amazon/lambda/deployment/RequestHandlerJandexUtil.java:35
public class RequestHandlerJandexUtil {
private static final DotName REQUEST_HANDLER = DotName.createSimple(RequestHandler.class);
private static final DotName OBJECT = DotName.createSimple("java.lang.Object");
private static final DotName COLLECTION = DotName.createSimple(Collection.class);
private RequestHandlerJandexUtil() {
}
public static RequestHandlerJandexDefinition discoverHandlerMethod(String handlerClassName, IndexView index) {
ClassInfo handlerClass = index.getClassByName(handlerClassName);
if (handlerClass == null) {
throw new IllegalArgumentException("RequestHandler class not found in the index: " + handlerClassName);
}
MethodInfo concreteHandleRequestMethod = findConcreteHandleRequestMethod(handlerClass, index);
if (concreteHandleRequestMethod == null) {
throw new IllegalStateException(
"Unable to find a concrete handleRequest method on handler class " + handlerClass.name());
}
Map<String, Type> typeMap = new HashMap<>();
InputOutputTypes inputOutputTypes = resolveInputOutputTypes(handlerClass.name(), index, typeMap);
if (isUnresolved(inputOutputTypes)) {
throw new IllegalStateException(
"Unable to resolve input and output types for handler class " + handlerClass.name());
}
return new RequestHandlerJandexDefinition(handlerClass, concreteHandleRequestMethod, inputOutputTypes);
}
private static MethodInfo findConcreteHandleRequestMethod(ClassInfo handlerClass, IndexView index) {
ClassInfo currentClass = handlerClass;
// Look for implementations of the method in the class hierarchy
while (currentClass != null && !OBJECT.equals(currentClass.name())) {View on GitHub (pinned to e1c734241f)
Solutions
- Implement a concrete (non-abstract) handleRequest method with the exact signature in the handler class or a superclass present in the index
- Ensure the abstract base class with the concrete method is in the same indexed module or an indexed dependency
- Make sure the method signature matches handleRequest(I input, Context context) returning O with correct parameter types
Example fix
// before
public abstract class Base implements RequestHandler<String,String> { }
// after
public class MyHandler extends Base {
@Override
public String handleRequest(String input, Context context) { return input; }
} Defensive patterns
Strategy: validation
Validate before calling
// ensure concrete implementation exists
Class<?> c = Class.forName("com.acme.MyHandler");
if (java.lang.reflect.Modifier.isAbstract(c.getModifiers())) throw new IllegalStateException("Handler class must not be abstract"); Prevention
- Implement handleRequest concretely in the handler class or an indexed superclass
- Match the exact handleRequest(I, Context) signature
- Avoid anonymous/lambda handler implementations for configured handlers
- Keep the hierarchy within indexed modules
When it happens
Trigger: discoverHandlerMethod calls findConcreteHandleRequestMethod(handlerClass, index) and receives null — the class (and its hierarchy within the index) never implements handleRequest.
Common situations: Class implements the handler interface as a lambda/anonymous form the index cannot resolve; class only inherits from an abstract base that is not in the index; abstract class registered as the handler itself; implementing the wrong handleRequest signature.
Related errors
- RequestHandler class not found in the index: <handlerClassNa
- Unable to resolve input and output types for handler class <
- The Amazon Lambda extensions are incompatible with the 'nati
- Multiple handler classes. You have a custom handler class a
- Unable to find handler class, make sure your deployment incl
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/6544be67eff942cc.
Report an issue: GitHub.