quarkusio/quarkus · error · IllegalArgumentException
Specified path can not be empty
Error message
Specified path can not be empty
What it means
NonApplicationRootPathBuildItem.resolvePath resolves an extension's non-application (management, dev UI, etc.) path against the configured non-application root. A null or whitespace-only path cannot be normalized to a route, so it throws IllegalArgumentException immediately. This is a programming/configuration error detected at build time.
Source
Thrown at extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/NonApplicationRootPathBuildItem.java:163
* <li>{@code resolvePath("/foo")} will return {@literal /foo}</li>
* </ul>
* Given {@literal quarkus.http.root-path=/app} and
* {@literal quarkus.http.non-application-root-path="/q"}
* <ul>
* <li>{@code resolvePath("foo")} will return {@literal /q/foo}</li>
* <li>{@code resolvePath("/foo")} will return {@literal /foo}</li>
* </ul>
* <p>
* The returned path will not end with a slash.
*
* @param path Path to be resolved to an absolute path.
* @return An absolute path not ending with a slash
* @throws IllegalArgumentException if path is null or empty
* @see UriNormalizationUtil#normalizeWithBase(URI, String, boolean)
*/
public String resolvePath(String path) {
if (path == null || path.trim().isEmpty()) {
throw new IllegalArgumentException("Specified path can not be empty");
}
return UriNormalizationUtil.normalizeWithBase(nonApplicationRootPath, path, false).getPath();
}
public String resolveManagementPath(String path, ManagementInterfaceBuildTimeConfig managementBuildTimeConfig,
LaunchModeBuildItem mode) {
return resolveManagementPath(path, managementBuildTimeConfig, mode, true);
}
public String resolveManagementPath(String path, ManagementInterfaceBuildTimeConfig managementBuildTimeConfig,
LaunchModeBuildItem mode, boolean extensionOverride) {
if (path == null || path.trim().isEmpty()) {
throw new IllegalArgumentException("Specified path can not be empty");
}
if (managementBuildTimeConfig.enabled() && extensionOverride) {
// Best effort
String prefix = getManagementUrlPrefix(mode);
if (managementRootPath != null) {View on GitHub (pinned to e1c734241f)
Solutions
- Pass a non-empty path, e.g. resolvePath("/health")
- Add a sensible default before calling: path != null ? path : "/default"
- Guard the call with a blank check and skip route registration if unset
Example fix
// before
String path = config.path(); // may be ""
buildItem.resolvePath(path);
// after
if (path != null && !path.isBlank()) {
buildItem.resolvePath(path);
} Defensive patterns
Strategy: validation
Validate before calling
if (path == null || path.isBlank()) {
path = "/default-path"; // or skip registration
} Type guard
boolean isValidPath(String p) { return p != null && !p.isBlank(); } Prevention
- Never pass raw optional config strings directly to resolvePath
- Apply defaults before resolving routes
- Validate path-bearing config at startup
When it happens
Trigger: Calling resolvePath(null), resolvePath(""), or resolvePath(" ") — typically when a config property like a UI/metrics path is unset or blank and passed straight in.
Common situations: Extension configuration property left unset with a blank default; YAML/properties value that is empty string; code that forgot to apply a default before resolving the route.
Related errors
- The configuration ${clazz} is missing the @ConfigRoot annota
- Invalid configuration value set for 'quarkus.arc.remove-unus
- Hibernate Envers activated explicitly for persistence unit '
- The FastbootHibernateProvider PersistenceProvider can not su
- Hibernate ORM activated explicitly for persistence unit '<pu
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/fdae5ae0e50d8cc3.
Report an issue: GitHub.