diff --git a/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/devui/OidcDevJsonRpcService.java b/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/devui/OidcDevJsonRpcService.java index e54c728dbe077..0c26e16a76d05 100644 --- a/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/devui/OidcDevJsonRpcService.java +++ b/extensions/oidc/runtime/src/main/java/io/quarkus/oidc/runtime/devui/OidcDevJsonRpcService.java @@ -45,7 +45,15 @@ public OidcDevJsonRpcService(HttpConfiguration httpConfiguration, SmallRyeConfig // we must always produce it when in DEV mode because we can't check for 'KeycloakDevServicesConfigBuildItem' // due to circular reference: JSON RPC provider is additional bean and 'LoggingSetupBuildItem' used by // 'KeycloakDevServicesProcessor' is created with combined index - OidcDevUiRpcSvcPropertiesBean props = Arc.container().instance(OidcDevUiRpcSvcPropertiesBean.class).get(); + final var propsInstanceHandle = Arc.container().instance(OidcDevUiRpcSvcPropertiesBean.class); + final OidcDevUiRpcSvcPropertiesBean props; + if (propsInstanceHandle.isAvailable()) { + props = propsInstanceHandle.get(); + } else { + // OIDC Dev UI is disabled, but this RPC service still gets initialized by Quarkus DEV UI + props = new OidcDevUiRpcSvcPropertiesBean(null, null, null, null, Map.of(), Map.of(), null, null, null, false, null, + List.of(), false, false, null, null, false); + } this.httpPort = httpConfiguration.port; this.config = config;