{"record":{"id":"128697d34336e25d","repo":"quarkusio/quarkus","slug":"unable-to-find-class-for-provider-providertoregi","errorCode":null,"errorMessage":"Unable to find class for provider ${providerToRegister}","messagePattern":"Unable to find class for provider (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/resteasy-classic/resteasy-client/runtime/src/main/java/io/quarkus/restclient/runtime/RestClientRecorder.java","lineNumber":74,"sourceCode":"        if (useBuiltIn) {\n            RegisterBuiltin.register(providerFactory);\n        } else {\n            providersToRegister.removeAll(contributedProviders);\n            registerProviders(providerFactory, providersToRegister, true);\n        }\n        registerProviders(providerFactory, contributedProviders, false);\n    }\n\n    private static void registerProviders(ResteasyProviderFactory providerFactory, Set<String> providersToRegister,\n            Boolean isBuiltIn) {\n        for (String providerToRegister : providersToRegister) {\n            try {\n                providerFactory\n                        .registerProvider(\n                                Thread.currentThread().getContextClassLoader().loadClass(providerToRegister.trim()),\n                                isBuiltIn);\n            } catch (ClassNotFoundException e) {\n                throw new RuntimeException(\"Unable to find class for provider \" + providerToRegister, e);\n            }\n        }\n    }\n}\n","sourceCodeStart":56,"sourceCodeEnd":79,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/resteasy-classic/resteasy-client/runtime/src/main/java/io/quarkus/restclient/runtime/RestClientRecorder.java#L56-L79","documentation":"RestClientRecorder.registerProviders() runs at build/startup time and loads each configured provider class via the runtime ClassLoader; ClassNotFoundException is wrapped in this RuntimeException naming the missing provider. Unlike RestClientBase.providerClassForName, this executes in the recorder during application start, so the app fails to boot.","triggerScenarios":"quarkus.rest-client.<key>.providers (or the global quarkus.rest-client.providers) contains a class name that the runtime ClassLoader cannot load — dependency missing from the runtime module, name typo, or class removed/renamed by a version upgrade.","commonSituations":"Upgrading a library that renamed/moved its filter or feature class; provider registered for the classic client but living in a reactive-only artifact; shade plugin excluding the class from the final jar.","solutions":["Fix or remove the offending entry in quarkus.rest-client.<key>.providers","Add the artifact containing the provider class as a runtime dependency","Inspect the dependency jar (jar tf <artifact>.jar | grep <Class>) to confirm the exact name after upgrades","Migrate to the replacement class per the library's upgrade notes"],"exampleFix":"// before (application.properties)\nquarkus.rest-client.audit.providers=org.jboss.resteasy.client.jackson.ResteasyJacksonJacksonProvider\n// after — corrected class name\nquarkus.rest-client.audit.providers=com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider","handlingStrategy":"validation","validationCode":"// verify recorder-time provider names resolve before deploying\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());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin provider class names against the exact dependency version in use","Run a minimal Quarkus startup test in CI that builds all configured clients","After upgrading JAX-RS/RESTEasy versions, re-verify every providers entry","Prefer programmatic registration in code over string class names in properties when possible"],"tags":["startup","class-not-found","providers","rest-client"],"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"}