{"record":{"id":"5c310afba9647128","repo":"quarkusio/quarkus","slug":"rest-data-panache-can-only-work-if-quarkus-rest","errorCode":null,"errorMessage":"REST Data Panache can only work if 'quarkus-rest' or 'quarkus-resteasy' is present","messagePattern":"REST Data Panache can only work if 'quarkus-rest' or 'quarkus-resteasy' is present","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"critical","filePath":"extensions/panache/rest-data-panache/deployment/src/main/java/io/quarkus/rest/data/panache/deployment/RestDataProcessor.java","lineNumber":41,"sourceCode":"import io.quarkus.rest.data.panache.runtime.sort.SortQueryParamFilter;\nimport io.quarkus.rest.data.panache.runtime.sort.SortQueryParamValidator;\nimport io.quarkus.resteasy.common.spi.ResteasyJaxrsProviderBuildItem;\nimport io.quarkus.resteasy.reactive.spi.ContainerRequestFilterBuildItem;\nimport io.quarkus.resteasy.reactive.spi.GeneratedJaxRsResourceBuildItem;\nimport io.quarkus.resteasy.reactive.spi.GeneratedJaxRsResourceGizmoAdaptor;\n\npublic class RestDataProcessor {\n\n    @BuildStep\n    void supportingBuildItems(Capabilities capabilities,\n            BuildProducer<RuntimeInitializedClassBuildItem> runtimeInitializedClassBuildItemBuildProducer,\n            BuildProducer<ResteasyJaxrsProviderBuildItem> resteasyJaxrsProviderBuildItemBuildProducer,\n            BuildProducer<ContainerRequestFilterBuildItem> containerRequestFilterBuildItemBuildProducer) {\n        boolean isResteasyClassicAvailable = capabilities.isPresent(Capability.RESTEASY);\n        boolean isResteasyReactiveAvailable = capabilities.isPresent(Capability.RESTEASY_REACTIVE);\n\n        if (!isResteasyClassicAvailable && !isResteasyReactiveAvailable) {\n            throw new IllegalStateException(\n                    \"REST Data Panache can only work if 'quarkus-rest' or 'quarkus-resteasy' is present\");\n        }\n\n        if (isResteasyClassicAvailable) {\n            runtimeInitializedClassBuildItemBuildProducer\n                    .produce(new RuntimeInitializedClassBuildItem(\"org.jboss.resteasy.links.impl.EL\"));\n            resteasyJaxrsProviderBuildItemBuildProducer\n                    .produce(new ResteasyJaxrsProviderBuildItem(SortQueryParamFilter.class.getName()));\n        } else {\n            containerRequestFilterBuildItemBuildProducer\n                    .produce(new ContainerRequestFilterBuildItem.Builder(SortQueryParamFilter.class.getName())\n                            .setNameBindingNames(Collections.singleton(SortQueryParamValidator.class.getName())).build());\n        }\n    }\n\n    @BuildStep\n    void implementResources(CombinedIndexBuildItem index,\n            List<RestDataResourceBuildItem> resourceBuildItems,","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/panache/rest-data-panache/deployment/src/main/java/io/quarkus/rest/data/panache/deployment/RestDataProcessor.java#L23-L59","documentation":"RestDataProcessor.supportingBuildItems verifies at build time that a JAX-RS implementation is present. REST Data Panache generates REST resources on top of either RESTEasy Classic (quarkus-resteasy) or RESTEasy Reactive (quarkus-rest); if neither capability is on the classpath it throws IllegalStateException because there is no runtime to host the generated endpoints.","triggerScenarios":"Adding io.quarkus:quarkus-rest-data-panache (or hibernate-rest-data-panache / reactive variants) to a project without quarkus-rest or quarkus-resteasy, then building the application.","commonSituations":"Newly generated apps missing the REST layer dependency; removing quarkus-resteasy during a migration to quarkus-rest while forgetting to add it; adding REST Data Panache to a non-HTTP (messaging-only) service.","solutions":["Add the reactive stack dependency: io.quarkus:quarkus-rest (recommended for new apps)","Or add the classic stack: io.quarkus:quarkus-resteasy","Verify with mvn dependency:tree that a REST extension is present in the runtime module","If the service truly needs no REST endpoints, remove the rest-data-panache dependency"],"exampleFix":"// before (pom.xml)\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-rest-data-panache</artifactId>\n</dependency>\n\n// after\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-rest</artifactId>\n</dependency>\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-rest-data-panache</artifactId>\n</dependency>","handlingStrategy":"validation","validationCode":"// pom.xml check before building\n// ensure exactly one REST stack is present:\n//   io.quarkus:quarkus-rest        (reactive, recommended)\n//   io.quarkus:quarkus-resteasy    (classic)\n// mvn dependency:tree -Dincludes=io.quarkus:quarkus-rest,io.quarkus:quarkus-resteasy","typeGuard":null,"tryCatchPattern":"// build-time failure — no runtime catch is possible;\n// fix the dependencies and rebuild","preventionTips":["Always pair quarkus-rest-data-panache with quarkus-rest or quarkus-resteasy","Check dependency tree after removing any REST extension","Quarkus project generation includes a REST extension — don't strip it if using REST Data Panache","Keep REST layer choice consistent across all modules of the application"],"tags":["quarkus","rest-data-panache","build-time","missing-dependency"],"backgroundTag":"missing-capability-extension","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"}