quarkusio/quarkus · error · IllegalArgumentException
Impossible to register service. Missing required 'type' for
Error message
Impossible to register service. Missing required 'type' for the following services: ${services} What it means
StorkRegistrarConfigRecorder.setupServiceRegistrarConfig collects every service whose registration config lacks a 'type'. If any are missing, it aggregates the service names and throws IllegalArgumentException listing them, because Stork cannot instantiate service registrars without knowing the target registry implementation.
Source
Thrown at extensions/smallrye-stork/runtime/src/main/java/io/quarkus/stork/StorkRegistrarConfigRecorder.java:85
} else {
failOnMissingRegistrarTypesForMultipleRegistrars(registrationConfigs);
}
}
private static void failOnMissingRegistrarTypesForMultipleRegistrars(List<ServiceConfig> registrationConfigs) {
List<String> servicesWithMissingType = new ArrayList<>();
for (ServiceConfig registrationConfig : registrationConfigs) {
var enabled = Boolean
.parseBoolean(registrationConfig.serviceRegistrar().parameters().getOrDefault("enabled", "true"));
if (enabled && registrationConfig.serviceRegistrar().type().isBlank()) {
servicesWithMissingType.add(registrationConfig.serviceName());
LOGGER.info("Missing 'type' for service '" + registrationConfig.serviceName()
+ "'. This may lead to a runtime error.");
}
}
if (!servicesWithMissingType.isEmpty()) {
throw new IllegalArgumentException(
"Impossible to register service. Missing required 'type' for the following services: " +
String.join(", ", servicesWithMissingType));
}
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Add quarkus.stork.<service>.service-registration.type for every service named in the error message (comma-separated list).
- Diff your active config profile (application-%prod.properties etc.) — the missing key may only be absent in the failing profile.
- Check for key typos; unknown properties are ignored so a misspelled 'type' key behaves exactly like a missing one.
Example fix
// before (application.properties) quarkus.stork.orders.service-registration.type=consul quarkus.stork.billing.service-registration.address=billing-svc // after quarkus.stork.orders.service-registration.type=consul quarkus.stork.billing.service-registration.type=eureka quarkus.stork.billing.service-registration.address=billing-svc
Defensive patterns
Strategy: validation
Validate before calling
// Before startup, verify each configured stork service declares a type // quarkus.stork.<service>.service-registration.type must exist for every // service listed under quarkus.stork.*
Try / catch
try {
recorder.setupServiceRegistrarConfig(...);
} catch (IllegalArgumentException e) {
LOG.error("Stork registrar config incomplete: " + e.getMessage());
} Prevention
- Keep all stork service entries in the same config file section so none is missed
- Watch for typos in the type key — unknown properties fail silently
- Diff per-profile config files when a service works in dev but fails in prod
When it happens
Trigger: Multiple quarkus.stork.<service>.service-registration entries exist but one or more omit quarkus.stork.<service>.service-registration.type; setupServiceRegistrarConfig runs at startup and fails listing all offending service names.
Common situations: Bulk-editing application.properties and dropping a type line for one of several registered services; per-environment config files where only prod defines types; a typo like service-registartion.type that Quarkus silently ignores; adding a new service entry and forgetting its type.
Related errors
- Unable to find top command. Ensure you have a @CommandDefini
- Unable to find credentials provider for the mailer {{mailerN
- Must provide the Signing Domain Identifier (sdid).
- Must provide the selector.
- Unable to find the TLS configuration {{name}} for the mailer
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/5d9cc271f6e0d1c8.
Report an issue: GitHub.