{"record":{"id":"ac4d851142ab73a2","repo":"quarkusio/quarkus","slug":"cannot-generate-hal-endpoints-without-either-quar-ac4d85","errorCode":null,"errorMessage":"Cannot generate HAL endpoints without either 'quarkus-rest-jackson' or 'quarkus-rest-jsonb'","messagePattern":"Cannot generate HAL endpoints without either 'quarkus-rest-jackson' or 'quarkus-rest-jsonb'","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/resteasy-reactive/rest-links/deployment/src/main/java/io/quarkus/resteasy/reactive/links/deployment/LinksProcessor.java","lineNumber":98,"sourceCode":"        linksProviderRecorder.setLinksContainer(linksContainer);\n    }\n\n    @BuildStep\n    AdditionalBeanBuildItem registerRestLinksProviderProducer() {\n        return AdditionalBeanBuildItem.unremovableOf(RestLinksProviderProducer.class);\n    }\n\n    @BuildStep\n    @Produce(ArtifactResultBuildItem.class)\n    void validateJsonNeededForHal(Capabilities capabilities,\n            ResteasyReactiveResourceMethodEntriesBuildItem resourceMethodEntriesBuildItem) {\n        boolean isHalSupported = capabilities.isPresent(Capability.HAL);\n        if (isHalSupported && isHalMediaTypeUsedInAnyResource(resourceMethodEntriesBuildItem.getEntries())) {\n\n            if (!capabilities.isPresent(Capability.RESTEASY_REACTIVE_JSON_JSONB) && !capabilities.isPresent(\n                    Capability.RESTEASY_REACTIVE_JSON_JACKSON)) {\n\n                throw new IllegalStateException(\"Cannot generate HAL endpoints without \"\n                        + \"either 'quarkus-rest-jackson' or 'quarkus-rest-jsonb'\");\n            }\n        }\n    }\n\n    @BuildStep\n    void addHalSupport(Capabilities capabilities,\n            BuildProducer<CustomContainerResponseFilterBuildItem> customResponseFilters,\n            BuildProducer<AdditionalBeanBuildItem> additionalBeans) {\n        boolean isHalSupported = capabilities.isPresent(Capability.HAL);\n        if (isHalSupported) {\n            customResponseFilters.produce(\n                    new CustomContainerResponseFilterBuildItem(HalServerResponseFilter.class.getName()));\n\n            additionalBeans.produce(AdditionalBeanBuildItem.unremovableOf(ResteasyReactiveHalService.class));\n        }\n    }\n","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/resteasy-reactive/rest-links/deployment/src/main/java/io/quarkus/resteasy/reactive/links/deployment/LinksProcessor.java#L80-L116","documentation":"LinksProcessor.validateJsonNeededForHal throws this at build time when HAL links are requested (quarkus.rest.links.hal.enabled or a resource method produces HAL media type) but no JSON serializer extension is present. Generating HAL representations requires either quarkus-rest-jackson or quarkus-rest-jsonb to serialize the response.","triggerScenarios":"Using quarkus-rest with quarkus-rest-links and producing HAL media type, while having no Jackson or JSON-B REST extension dependency; e.g. switching from quarkus-resteasy-jackson to quarkus-rest and forgetting to add quarkus-rest-jackson.","commonSituations":"Migrating to RESTEasy Reactive/quarkus-rest and losing the JSON module; an app producing only custom/media writers but also declaring HAL links.","solutions":["Add io.quarkus:quarkus-rest-jackson (or quarkus-rest-jsonb) as a dependency.","If HAL is unintended, disable it via quarkus.rest.links.hal.enabled=false or remove the HAL media type from resource methods.","Ensure the correct reactive-stack extension family matches your REST setup."],"exampleFix":"// before (pom.xml): only quarkus-rest present\n// after\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-rest-jackson</artifactId>\n</dependency>","handlingStrategy":"validation","validationCode":"// pom.xml sanity check before using HAL\n// require quarkus-rest-jackson or quarkus-rest-jsonb dependency present","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Add quarkus-rest-jackson/jsonb whenever HAL links are enabled","Align extension sets when migrating REST stacks","Disable quarkus.rest.links.hal.enabled if HAL is unused"],"tags":["build-time","resteasy-reactive","hal","json"],"backgroundTag":"missing-dependency","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-15T02:17:10.978Z"}