{"record":{"id":"8f375755ac4fb5cd","repo":"quarkusio/quarkus","slug":"a-route-requires-validation-but-the-hibernate-val","errorCode":null,"errorMessage":"A route requires validation, but the Hibernate Validator extension is not present","messagePattern":"A route requires validation, but the Hibernate Validator extension is not present","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/reactive-routes/deployment/src/main/java/io/quarkus/vertx/web/deployment/ReactiveRoutesProcessor.java","lineNumber":612,"sourceCode":"                        \"Route method that returns void must accept at least one parameter that can end the response [method: %s, bean: %s]\",\n                        method, bean));\n            }\n\n            if (failureParams > 1) {\n                throw new IllegalStateException(String.format(\n                        \"A failure handler may only define one failure parameter - route method %s declared on %s\",\n                        method, bean));\n            }\n        }\n    }\n\n    private String generateHandler(HandlerDescriptor desc, BeanInfo bean, MethodInfo method, Gizmo gizmo,\n            TransformedAnnotationsBuildItem transformedAnnotations, AnnotationInstance routeAnnotation,\n            BuildProducer<ReflectiveHierarchyBuildItem> reflectiveHierarchy, String defaultProduces,\n            boolean validatorAvailable, IndexView index) {\n\n        if (desc.requireValidation() && !validatorAvailable) {\n            throw new IllegalStateException(\n                    \"A route requires validation, but the Hibernate Validator extension is not present\");\n        }\n\n        StringBuilder signature = new StringBuilder();\n        signature.append(method.name()).append(\"_\").append(method.returnType().name());\n        for (Type parameterType : method.parameterTypes()) {\n            signature.append(parameterType.name());\n        }\n        signature.append(routeAnnotation.toString(true));\n\n        String generatedName = bean.getImplClazz().name().toString() + HANDLER_SUFFIX + \"_\" + method.name() + \"_\"\n                + HashUtil.sha1(signature.toString());\n\n        gizmo.class_(generatedName, cc -> {\n            cc.extends_(RouteHandler.class);\n\n            FieldDesc beanField = cc.field(\"bean\", fc -> {\n                fc.private_();","sourceCodeStart":594,"sourceCodeEnd":630,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/reactive-routes/deployment/src/main/java/io/quarkus/vertx/web/deployment/ReactiveRoutesProcessor.java#L594-L630","documentation":"Raised in ReactiveRoutesProcessor.generateHandler when a route method's parameters carry validation constraints (Bean Validation annotations detected on route parameters) but the Hibernate Validator extension is not among the application's build dependencies. The generated handler bytecode would need to call the validator to enforce the constraints; without the extension present at build time there is nothing to call, so generation aborts with this message rather than silently skipping validation.","triggerScenarios":"Thrown at extensions/reactive-routes/deployment/src/main/java/io/quarkus/vertx/web/deployment/ReactiveRoutesProcessor.java:612 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the quarkus-hibernate-validator extension to the application","Remove the validation annotations from route parameters if validation is not intended"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}