quarkusio/quarkus · error · IllegalStateException
Cannot generate HAL endpoints without either 'quarkus-rest-j
Error message
Cannot generate HAL endpoints without either 'quarkus-rest-jackson' or 'quarkus-rest-jsonb'
What it means
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.
Source
Thrown at extensions/resteasy-reactive/rest-links/deployment/src/main/java/io/quarkus/resteasy/reactive/links/deployment/LinksProcessor.java:98
linksProviderRecorder.setLinksContainer(linksContainer);
}
@BuildStep
AdditionalBeanBuildItem registerRestLinksProviderProducer() {
return AdditionalBeanBuildItem.unremovableOf(RestLinksProviderProducer.class);
}
@BuildStep
@Produce(ArtifactResultBuildItem.class)
void validateJsonNeededForHal(Capabilities capabilities,
ResteasyReactiveResourceMethodEntriesBuildItem resourceMethodEntriesBuildItem) {
boolean isHalSupported = capabilities.isPresent(Capability.HAL);
if (isHalSupported && isHalMediaTypeUsedInAnyResource(resourceMethodEntriesBuildItem.getEntries())) {
if (!capabilities.isPresent(Capability.RESTEASY_REACTIVE_JSON_JSONB) && !capabilities.isPresent(
Capability.RESTEASY_REACTIVE_JSON_JACKSON)) {
throw new IllegalStateException("Cannot generate HAL endpoints without "
+ "either 'quarkus-rest-jackson' or 'quarkus-rest-jsonb'");
}
}
}
@BuildStep
void addHalSupport(Capabilities capabilities,
BuildProducer<CustomContainerResponseFilterBuildItem> customResponseFilters,
BuildProducer<AdditionalBeanBuildItem> additionalBeans) {
boolean isHalSupported = capabilities.isPresent(Capability.HAL);
if (isHalSupported) {
customResponseFilters.produce(
new CustomContainerResponseFilterBuildItem(HalServerResponseFilter.class.getName()));
additionalBeans.produce(AdditionalBeanBuildItem.unremovableOf(ResteasyReactiveHalService.class));
}
}
View on GitHub (pinned to e1c734241f)
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.
Example fix
// before (pom.xml): only quarkus-rest present // after <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-rest-jackson</artifactId> </dependency>
Defensive patterns
Strategy: validation
Validate before calling
// pom.xml sanity check before using HAL // require quarkus-rest-jackson or quarkus-rest-jsonb dependency present
Prevention
- 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
When it happens
Trigger: 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.
Common situations: Migrating to RESTEasy Reactive/quarkus-rest and losing the JSON module; an app producing only custom/media writers but also declaring HAL links.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- Cannot generate HAL endpoints without either 'quarkus-restea
- Cannot generate HAL endpoints without either 'quarkus-rest-j
- Providing multiple BuiltInReaderOverrideBuildItem for the sa
- @Compressed and @Uncompressed cannot be both declared on res
- The combination of '@${annotationName}' and '@ServerRequestF
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/ac4d851142ab73a2.
Report an issue: GitHub.