{"record":{"id":"6205d8f9f12ab94c","repo":"quarkusio/quarkus","slug":"requesthandler-class-not-found-in-the-index-hand","errorCode":null,"errorMessage":"RequestHandler class not found in the index: <handlerClassName>","messagePattern":"RequestHandler class not found in the index: <handlerClassName>","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/amazon-lambda/deployment/src/main/java/io/quarkus/amazon/lambda/deployment/RequestHandlerJandexUtil.java","lineNumber":30,"sourceCode":"import org.jboss.jandex.ParameterizedType;\nimport org.jboss.jandex.Type;\nimport org.jboss.jandex.TypeVariable;\n\nimport com.amazonaws.services.lambda.runtime.RequestHandler;\n\npublic class RequestHandlerJandexUtil {\n\n    private static final DotName REQUEST_HANDLER = DotName.createSimple(RequestHandler.class);\n    private static final DotName OBJECT = DotName.createSimple(\"java.lang.Object\");\n    private static final DotName COLLECTION = DotName.createSimple(Collection.class);\n\n    private RequestHandlerJandexUtil() {\n    }\n\n    public static RequestHandlerJandexDefinition discoverHandlerMethod(String handlerClassName, IndexView index) {\n        ClassInfo handlerClass = index.getClassByName(handlerClassName);\n        if (handlerClass == null) {\n            throw new IllegalArgumentException(\"RequestHandler class not found in the index: \" + handlerClassName);\n        }\n\n        MethodInfo concreteHandleRequestMethod = findConcreteHandleRequestMethod(handlerClass, index);\n        if (concreteHandleRequestMethod == null) {\n            throw new IllegalStateException(\n                    \"Unable to find a concrete handleRequest method on handler class \" + handlerClass.name());\n        }\n\n        Map<String, Type> typeMap = new HashMap<>();\n        InputOutputTypes inputOutputTypes = resolveInputOutputTypes(handlerClass.name(), index, typeMap);\n        if (isUnresolved(inputOutputTypes)) {\n            throw new IllegalStateException(\n                    \"Unable to resolve input and output types for handler class \" + handlerClass.name());\n        }\n\n        return new RequestHandlerJandexDefinition(handlerClass, concreteHandleRequestMethod, inputOutputTypes);\n    }\n","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/amazon-lambda/deployment/src/main/java/io/quarkus/amazon/lambda/deployment/RequestHandlerJandexUtil.java#L12-L48","documentation":"RequestHandlerJandexUtil.discoverHandlerMethod looks up the configured handler class in the build-time Jandex index; index.getClassByName returned null, so the class name cannot be resolved to bytecode metadata for recording the handler.","triggerScenarios":"discoverHandlerMethod(handlerClassName, index) is called (e.g. from recordStaticInitHandlerClass for a configured lambda handler) and the index has no ClassInfo for that exact name.","commonSituations":"Typo or wrong package in the configured handler class name (quarkus.lambda.handler.<name>.handler class); class lives in an unindexed dependency jar; handler class was refactored/renamed but config still points at the old name.","solutions":["Fix the fully qualified class name in the lambda handler configuration to match the actual class","Ensure the class is in the application's own sources so it is Jandex-indexed at build time","If the handler is in a library jar, add a Jandex index to that jar (jandex-maven-plugin) or list it via quarkus.index-dependencies.<group>.artifact-id","Clean and rebuild so the index reflects recent renames"],"exampleFix":"# before\nquarkus.lambda.handler.myfun.handler=com.acme.Handlr\n# after\nquarkus.lambda.handler.myfun.handler=com.acme.MyHandler","handlingStrategy":"validation","validationCode":"// pre-check before configuring\nClassInfo ci = index.getClassByName(\"com.acme.MyHandler\");\nif (ci == null) throw new IllegalArgumentException(\"Handler class not indexed: com.acme.MyHandler\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy-paste fully qualified class names instead of typing them","Re-index dependencies with jandex-maven-plugin","Rebuild after moving/renaming handler classes","Keep handlers in application sources when possible"],"tags":["quarkus","amazon-lambda","jandex","build","config"],"backgroundTag":"class-not-in-index","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}