{"record":{"id":"9b29a46b9116716d","repo":"quarkusio/quarkus","slug":"cannot-generate-hal-endpoints-without-either-quar-9b29a4","errorCode":null,"errorMessage":"Cannot generate HAL endpoints without either 'quarkus-rest-jsonb' or 'quarkus-rest-jackson'","messagePattern":"Cannot generate HAL endpoints without either 'quarkus-rest-jsonb' or 'quarkus-rest-jackson'","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/panache/rest-data-panache/deployment/src/main/java/io/quarkus/rest/data/panache/deployment/RestDataProcessor.java","lineNumber":90,"sourceCode":"        }\n\n        Set<String> excludedClasses = getExcludedClasses(buildTimeConditions);\n        ClassOutput classOutput = isResteasyClassic ? new GeneratedBeanGizmoAdaptor(resteasyClassicImplementationsProducer)\n                : new GeneratedJaxRsResourceGizmoAdaptor(resteasyReactiveImplementationsProducer);\n        JaxRsResourceImplementor jaxRsResourceImplementor = new JaxRsResourceImplementor(capabilities);\n        ResourcePropertiesProvider resourcePropertiesProvider = new ResourcePropertiesProvider(index.getIndex());\n\n        for (RestDataResourceBuildItem resourceBuildItem : resourceBuildItems) {\n            if (!excludedClasses.contains(resourceBuildItem.getResourceMetadata().getResourceName())) {\n                ResourceMetadata resourceMetadata = resourceBuildItem.getResourceMetadata();\n                ResourceProperties resourceProperties = getResourceProperties(resourcePropertiesProvider,\n                        resourceMetadata, resourcePropertiesBuildItems);\n                if (resourceProperties.isHal()) {\n                    if (isResteasyClassic && !hasAnyJsonCapabilityForResteasyClassic(capabilities)) {\n                        throw new IllegalStateException(\"Cannot generate HAL endpoints without \"\n                                + \"either 'quarkus-resteasy-jsonb' or 'quarkus-resteasy-jackson'\");\n                    } else if (!isResteasyClassic && !hasAnyJsonCapabilityForResteasyReactive(capabilities)) {\n                        throw new IllegalStateException(\"Cannot generate HAL endpoints without \"\n                                + \"either 'quarkus-rest-jsonb' or 'quarkus-rest-jackson'\");\n                    }\n\n                }\n                if (resourceProperties.isExposed()) {\n                    jaxRsResourceImplementor.implement(classOutput, resourceMetadata, resourceProperties, capabilities);\n                }\n            }\n        }\n    }\n\n    private ResourceProperties getResourceProperties(ResourcePropertiesProvider resourcePropertiesProvider,\n            ResourceMetadata resourceMetadata, List<ResourcePropertiesBuildItem> resourcePropertiesBuildItems) {\n        for (ResourcePropertiesBuildItem resourcePropertiesBuildItem : resourcePropertiesBuildItems) {\n            if (resourcePropertiesBuildItem.getResourceType().equals(resourceMetadata.getResourceClass())\n                    || resourcePropertiesBuildItem.getResourceType().equals(resourceMetadata.getResourceName())) {\n                return resourcePropertiesBuildItem.getResourcePropertiesInfo();\n            }","sourceCodeStart":72,"sourceCodeEnd":108,"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#L72-L108","documentation":"Same check as the classic variant but for RESTEasy Reactive: when HAL endpoints are generated for a resource and the application does not include a reactive JSON serializer (quarkus-rest-jsonb or quarkus-rest-jackson), the deployment fails. HAL response generation depends on the reactive JSON provider being available.","triggerScenarios":"Build time: HAL is enabled for a REST Data Panache resource while the app uses RESTEasy Reactive (isResteasyClassic false) and neither quarkus-rest-jsonb nor quarkus-rest-jackson capability is present.","commonSituations":"App uses quarkus-rest (reactive) but the JSON extension was never added; dependency tree was pruned of jackson/jsonb; user followed Classic docs in a Reactive app and added the wrong (resteasy-*) JSON extension.","solutions":["Add io.quarkus:quarkus-rest-jackson (or quarkus-rest-jsonb) to the dependencies.","If the app is actually RESTEasy Classic, add quarkus-resteasy-jackson/quarkus-resteasy-jsonb instead.","Disable HAL for the resource if HAL links are not needed."],"exampleFix":"// before (pom.xml): reactive REST, no JSON provider\n<dependency>io.quarkus:quarkus-rest</dependency>\n// after\n<dependency>io.quarkus:quarkus-rest</dependency>\n<dependency>io.quarkus:quarkus-rest-jackson</dependency>","handlingStrategy":"validation","validationCode":"// verify reactive JSON capability before enabling HAL\nif (usesReactiveRest() && !hasDependency(\"io.quarkus:quarkus-rest-jackson\")\n        && !hasDependency(\"io.quarkus:quarkus-rest-jsonb\")) {\n    throw new IllegalStateException(\"Add quarkus-rest-jackson to generate HAL endpoints\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["With quarkus-rest (reactive), add quarkus-rest-jackson — not quarkus-resteasy-jackson.","Run mvn dependency:tree to confirm the reactive JSON extension is present.","Disable HAL in @ResourceProperties/config if HAL links are unnecessary.","Re-check extensions after migrations between classic and reactive REST."],"tags":["quarkus","build-time","rest-data-panache","hal","missing-dependency"],"backgroundTag":"missing-extension-dependency","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"}