{"record":{"id":"736ebe37cf1dc510","repo":"quarkusio/quarkus","slug":"unable-to-load-handled-exception-type-i-getprovi","errorCode":null,"errorMessage":"Unable to load handled exception type ${i.getProvidedType()}","messagePattern":"Unable to load handled exception type (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/resteasy-reactive/rest/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/ResteasyReactiveScanningProcessor.java","lineNumber":368,"sourceCode":"                }\n            }\n        }\n        for (ContextResolverBuildItem i : additionalResolvers) {\n            if (i.isRegisterAsBean()) {\n                beanBuilder.addBeanClass(i.getClassName());\n            } else {\n                reflectiveClassBuildItemBuildProducer\n                        .produce(ReflectiveClassBuildItem.builder(i.getClassName())\n                                .build());\n            }\n            ResourceContextResolver resolver = new ResourceContextResolver();\n            resolver.setClassName(i.getClassName());\n            resolver.setMediaTypeStrings(i.getMediaTypes());\n            try {\n                resolvers.addContextResolver((Class) Class.forName(i.getProvidedType(), false,\n                        Thread.currentThread().getContextClassLoader()), resolver);\n            } catch (ClassNotFoundException e) {\n                throw new RuntimeException(\n                        \"Unable to load handled exception type \" + i.getProvidedType(), e);\n            }\n        }\n        additionalBeanBuildItemBuildProducer.produce(beanBuilder.build());\n        return new ContextResolversBuildItem(resolvers);\n    }\n\n    @BuildStep\n    public void scanForParamConverters(CombinedIndexBuildItem combinedIndexBuildItem,\n            ApplicationResultBuildItem applicationResultBuildItem,\n            BuildProducer<ParamConverterBuildItem> paramConverterBuildItemBuildProducer) {\n        IndexView index = combinedIndexBuildItem.getComputingIndex();\n        Collection<ClassInfo> paramConverterProviders = index\n                .getAllKnownImplementors(ResteasyReactiveDotNames.PARAM_CONVERTER_PROVIDER);\n\n        for (ClassInfo converterClass : paramConverterProviders) {\n            ApplicationScanningResult.KeepProviderResult keepProviderResult = applicationResultBuildItem.getResult()\n                    .keepProvider(converterClass);","sourceCodeStart":350,"sourceCodeEnd":386,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/resteasy-reactive/rest/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/ResteasyReactiveScanningProcessor.java#L350-L386","documentation":"Quarkus REST (RESTEasy Reactive) throws this during deployment while scanning context resolver providers. It failed to load the class named by the ContextResolver's handled type (the type parameter the resolver provides representations for) using the thread context classloader. This means the indexed type string cannot be resolved to a Class at deployment time.","triggerScenarios":"An application declares a jakarta.ws.rs.ext.ContextResolver whose handled type (e.g. a generic parameter or the value returned by a custom provider scan entry 'i.getProvidedType()') refers to a class that is not on the deployment classloader — e.g. an optional dependency not present, a typo in a synthetic provider entry, or the type lives in a module not visible to the TCCL.","commonSituations":"Using a ContextResolver for Jackson/JSON-B targeting a class from a library marked as optional; multi-module projects where the entity type is in a module not listed as a dependency; classloader changes after adding Quarkus REST; index entries recorded from a different classloader than the runtime one.","solutions":["Add the missing class/library as a dependency of the application so the TCCL can load the provided type","Verify the ContextResolver's handled type generic parameter is correct and the class exists at compile time","Check for typos or renamed/moved classes in the provider registration and rebuild with ./mvnw clean install","If the type is optional, guard the resolver registration or exclude the provider from scanning"],"exampleFix":"// before (type not on classpath)\npublic class MyResolver implements ContextResolver<MyRemovedDto> { ... }\n// after (restore or point to an existing type)\npublic class MyResolver implements ContextResolver<MyDto> { ... }\n","handlingStrategy":"validation","validationCode":"// before registering, verify the handled type loads\ntry {\n    Class.forName(providedTypeName, false, Thread.currentThread().getContextClassLoader());\n} catch (ClassNotFoundException e) {\n    throw new IllegalStateException(\"ContextResolver type missing from classpath: \" + providedTypeName, e);\n}","typeGuard":null,"tryCatchPattern":"try { resolver.register(...) } catch (RuntimeException e) {\n    if (e.getCause() instanceof ClassNotFoundException cnfe) {\n        // handle missing provider type: log and skip or add dependency\n    } else throw e;\n}","preventionTips":["Ensure every type referenced by a ContextResolver is a real compile-time dependency","Run ./mvnw clean install after refactoring package names","Keep optional dependencies out of provider generic signatures"],"tags":["quarkus","resteasy-reactive","classpath","classnotfound","deployment"],"backgroundTag":"classnotfound-during-deployment","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"}