{"record":{"id":"4762233508adefc3","repo":"quarkusio/quarkus","slug":"could-not-find-provider-class-name","errorCode":null,"errorMessage":"Could not find provider class: ${name}","messagePattern":"Could not find provider class: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/resteasy-classic/resteasy-client/runtime/src/main/java/io/quarkus/restclient/runtime/RestClientBase.java","lineNumber":266,"sourceCode":"        }\n        if (clientProviders != null) {\n            for (Class<?> annotationProvider : clientProviders) {\n                builder.register(annotationProvider);\n            }\n        }\n    }\n\n    private void registerProviders(RestClientBuilder 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    protected void configureTimeouts(RestClientBuilder 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    protected void configureBaseUrl(RestClientBuilder builder) {\n        Optional<String> baseUrlOptional = oneOf(restClientConfig.uriReload(), restClientConfig.urlReload());\n        if (((baseUriFromAnnotation == null) || baseUriFromAnnotation.isEmpty()) && baseUrlOptional.isEmpty()) {","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/resteasy-classic/resteasy-client/runtime/src/main/java/io/quarkus/restclient/runtime/RestClientBase.java#L248-L284","documentation":"providerClassForName() loads each REST client provider class by name from the thread context ClassLoader and wraps ClassNotFoundException in a RuntimeException when the class is absent. Providers listed in @RegisterProvider, quarkus.rest-client.<key>.providers, or MP RestClient config must be on the runtime classpath.","triggerScenarios":"A class listed in quarkus.rest-client.<key>.providers=com.example.MyFilter does not exist at runtime — typo, missing Maven dependency, or the class lives in a test/dev-only module.","commonSituations":"Renaming/refactoring a provider class without updating the config property; provider contributed by a dependency marked <scope>provided</scope> or only in the test classpath; fully-qualified name with wrong package after a package move.","solutions":["Correct the fully-qualified class name in the providers config property or annotation","Add the module/dependency containing the provider to the runtime classpath","Search the codebase for the class to confirm its current package and name","If the provider belongs to a library, add the artifact that ships it rather than assuming transitive availability"],"exampleFix":"// before (application.properties)\nquarkus.rest-client.inventory.providers=com.example.old.AuthFilter\n// after\nquarkus.rest-client.inventory.providers=com.example.rest.AuthFilter","handlingStrategy":"validation","validationCode":"// verify provider classes exist before startup\nString providers = ConfigProvider.getConfig()\n    .getValue(\"quarkus.rest-client.my-client.providers\", String.class);\nfor (String name : providers.split(\",\")) {\n    Class.forName(name.trim(), false, Thread.currentThread().getContextClassLoader()); // throws if absent\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep provider FQCNs in constants next to the client interface","Add an integration test that resolves every configured provider class","Re-check providers config after any dependency upgrade or refactor","Avoid providers from test/provided-scoped dependencies in production config"],"tags":["classpath","rest-client","providers","class-not-found"],"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-14T05:17:10.506Z"}