{"record":{"id":"b237e052bb41f6eb","repo":"quarkusio/quarkus","slug":"could-not-find-provider-class-name-b237e0","errorCode":null,"errorMessage":"Could not find provider class: \" + name","messagePattern":"Could not find provider class: \" \\+ name","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/resteasy-reactive/rest-client/runtime/src/main/java/io/quarkus/rest/client/reactive/runtime/RestClientCDIDelegateBuilder.java","lineNumber":397,"sourceCode":"\n    private void configureProviders(QuarkusRestClientBuilder builder) {\n        Optional<String> maybeProviders = oneOf(restClientConfig.providers(), configRoot.providers());\n        if (maybeProviders.isPresent()) {\n            registerProviders(builder, maybeProviders.get());\n        }\n    }\n\n    private void registerProviders(QuarkusRestClientBuilder builder, String providersAsString) {\n        for (String s : providersAsString.split(\",\")) {\n            builder.register(providerClassForName(s.trim()));\n        }\n    }\n\n    private Class<?> providerClassForName(String name) {\n        try {\n            return Class.forName(name, true, Thread.currentThread().getContextClassLoader());\n        } catch (ClassNotFoundException e) {\n            throw new RuntimeException(\"Could not find provider class: \" + name);\n        }\n    }\n\n    private void configureTimeouts(QuarkusRestClientBuilder builder) {\n        Long connectTimeout = restClientConfig.connectTimeout().orElse(this.configRoot.connectTimeout());\n        if (connectTimeout != null) {\n            builder.connectTimeout(connectTimeout, TimeUnit.MILLISECONDS);\n        }\n\n        Long readTimeout = restClientConfig.readTimeout().orElse(this.configRoot.readTimeout());\n        if (readTimeout != null) {\n            builder.readTimeout(readTimeout, TimeUnit.MILLISECONDS);\n        }\n    }\n\n    private void configureBaseUrl(QuarkusRestClientBuilder builder) {\n        Optional<String> propertyOptional = oneOf(restClientConfig.uriReload(), restClientConfig.urlReload());\n        if (((baseUriFromAnnotation == null) || baseUriFromAnnotation.isEmpty())","sourceCodeStart":379,"sourceCodeEnd":415,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/resteasy-reactive/rest-client/runtime/src/main/java/io/quarkus/rest/client/reactive/runtime/RestClientCDIDelegateBuilder.java#L379-L415","documentation":"Thrown by RestClientCDIDelegateBuilder.providerClassForName when a JAX-RS provider class name configured for the rest client (via @RegisterProvider or registerProviders) cannot be loaded with Class.forName using the thread-context classloader. The configured class name does not exist on the classpath, and the original ClassNotFoundException is wrapped into a RuntimeException.","triggerScenarios":"A provider class name set via quarkus.rest-client.<key>.providers (or @RegisterProvider / MP Rest Client 'providers' property) references a class that is not on the runtime classpath, or is misspelled / uses the wrong fully-qualified name (e.g. missing package or old package after a library upgrade).","commonSituations":"Registering a provider like org.example.MyFilter without adding the module/jar providing it to dependencies; renaming or moving the provider class and forgetting to update the config property; upgrading a library whose provider FQN changed; typos in the comma-separated providers list.","solutions":["Check the providers config value and correct the fully-qualified class name (verify with an import in code or the jar's contents)","Add the dependency that contains the provider class to the application (verify with mvn dependency:tree and by locating the class in the jar)","If the provider was removed/renamed in an upgrade, replace it with the new class or drop it from the list","Prefer @RegisterProvider(MyProvider.class) on the interface over string-based config so typos fail at compile time"],"exampleFix":"// before (application.properties)\nquarkus.rest-client.myservice.providers=com.example.auth.AuthFilter\n// after (class moved packages)\nquarkus.rest-client.myservice.providers=com.example.rest.AuthFilter","handlingStrategy":"validation","validationCode":"String providers = \"com.example.MyFilter\";\nClass.forName(providers, true, Thread.currentThread().getContextClassLoader()); // throws ClassNotFoundException early if missing","typeGuard":null,"tryCatchPattern":"try {\n    MyClient client = Arc.container().instance(MyClient.class).get();\n} catch (RuntimeException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"Could not find provider class\")) {\n        throw new ConfigurationException(\"Provider class missing from classpath — fix providers config or add dependency\", e);\n    }\n    throw e;\n}","preventionTips":["Prefer @RegisterProvider(Class) on the interface over string-based providers config for compile-time safety","Keep provider FQNs in sync when refactoring packages","Run a build-time check (mvn dependency:tree + jar tf) that the provider class is on the classpath"],"tags":["rest-client","classpath","provider","configuration","classnotfound"],"backgroundTag":"class-not-found","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}