quarkusio/quarkus · error · RuntimeException
Invalid dynamic URL Method name, can not be empty
Error message
Invalid dynamic URL Method name, can not be empty
What it means
ExternalPageBuilder.dynamicUrlJsonRPCMethodName(String) sets the name of the JSON-RPC method that computes the page URL at runtime. An empty method name cannot be resolved against any Dev UI JSON-RPC service, so the builder rejects it.
Source
Thrown at extensions/devui/deployment-spi/src/main/java/io/quarkus/devui/spi/page/ExternalPageBuilder.java:48
return url(url, null);
}
public ExternalPageBuilder url(String url, String externalLink) {
if (url == null || url.isEmpty()) {
throw new RuntimeException("Invalid external URL, can not be empty");
}
super.metadata.put(EXTERNAL_URL, url);
if (externalLink != null) {
return staticLabel("<a style='color: var(--lumo-contrast-80pct);' href='" + externalLink
+ "' target='_blank'><vaadin-icon class='icon' icon='font-awesome-solid:up-right-from-square'></vaadin-icon></a>");
}
return this;
}
@SuppressWarnings("unchecked")
public ExternalPageBuilder dynamicUrlJsonRPCMethodName(String methodName) {
if (methodName == null || methodName.isEmpty()) {
throw new RuntimeException("Invalid dynamic URL Method name, can not be empty");
}
super.metadata.put(DYNAMIC_URL, methodName);
return this;
}
@SuppressWarnings("unchecked")
public ExternalPageBuilder dynamicUrlJsonRPCMethodName(String methodName, Map<String, String> parameters) {
dynamicUrlJsonRPCMethodName(methodName);
if (parameters != null && !parameters.isEmpty()) {
super.metadata.put(DYNAMIC_URL + "Params", parameters.entrySet().stream()
.map(e -> URLEncoder.encode(e.getKey(), StandardCharsets.UTF_8) + "="
+ URLEncoder.encode(e.getValue(), StandardCharsets.UTF_8))
.reduce((a, b) -> a + "&" + b)
.orElse(""));
}
return this;
}
View on GitHub (pinned to e1c734241f)
Solutions
- Pass the exact method name exposed by your Dev UI JSON-RPC service, e.g. dynamicUrlJsonRPCMethodName("getDashboardUrl")
- Confirm the provider class is registered as a Dev UI JSON-RPC service and the name matches exactly (case-sensitive)
- If the name comes from config, fail earlier with a clearer message or default it to a valid method name
- Fall back to a static url(...) when no dynamic provider is available
Example fix
// before String m = config.urlProviderMethod(); // "" externalPage().dynamicUrlJsonRPCMethodName(m); // throws // after String m = config.urlProviderMethod(); externalPage().dynamicUrlJsonRPCMethodName(m.isBlank() ? "getDefaultUrl" : m);
Defensive patterns
Strategy: validation
Validate before calling
if (methodName == null || methodName.isBlank()) {
throw new IllegalStateException("Dynamic URL JSON-RPC method name must be non-empty");
} Type guard
boolean isValidRpcName(String m) {
return m != null && m.matches("[a-zA-Z][a-zA-Z0-9]*");
} Try / catch
try {
externalPage().dynamicUrlJsonRPCMethodName(m);
} catch (RuntimeException e) {
if (e.getMessage().contains("dynamic URL Method name")) {
externalPage().url(DEFAULT_URL); // static fallback
} else throw e;
} Prevention
- Reference JSON-RPC method names via constants shared with the provider class
- Verify the provider is registered as a Dev UI JSON-RPC service
- Fall back to a static url() when no dynamic provider is configured
- Fail early on blank config values with your own clearer message
When it happens
Trigger: Calling dynamicUrlJsonRPCMethodName("") or dynamicUrlJsonRPCMethodName(null), often because the method name is assembled from config or a constant that is unset.
Common situations: Extension authors making the external URL configurable at runtime via a @JsonRPC provider but passing an uninitialized/blank name; renaming the provider method and leaving an empty constant behind; config-driven Dev UI pages where the method-name property is missing.
Related errors
- CardAction requires either jsonRpcMethodName() or url()
- Invalid external URL, can not be empty
- Invalid mimeType, can not be empty
- You have to specify a key. This is the key the user will pre
- You have to specify a description. This is what the user wil
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/fa54f24113ea800f.
Report an issue: GitHub.