{"record":{"id":"5e36a326987a7b73","repo":"quarkusio/quarkus","slug":"cannot-load-required-type-requiredtype","errorCode":null,"errorMessage":"Cannot load required type: <requiredType>","messagePattern":"Cannot load required type: <requiredType>","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ConfigPropertyCreator.java","lineNumber":25,"sourceCode":"\nimport io.quarkus.arc.BeanCreator;\nimport io.quarkus.arc.SyntheticCreationalContext;\nimport io.quarkus.arc.impl.InjectionPointProvider;\nimport io.smallrye.config.inject.ConfigProducerUtil;\n\npublic class ConfigPropertyCreator implements BeanCreator<Object> {\n    @Override\n    public Object create(SyntheticCreationalContext<Object> context) {\n        String requiredType = context.getParams().get(\"requiredType\").toString();\n        ClassLoader cl = Thread.currentThread().getContextClassLoader();\n        if (cl == null) {\n            cl = ConfigPropertyCreator.class.getClassLoader();\n        }\n\n        try {\n            Class.forName(requiredType, true, cl);\n        } catch (ClassNotFoundException e) {\n            throw new IllegalStateException(\"Cannot load required type: \" + requiredType);\n        }\n\n        InjectionPoint injectionPoint = InjectionPointProvider.getCurrent(context);\n        if (injectionPoint == null) {\n            throw new IllegalStateException(\"No current injection point found\");\n        }\n\n        ConfigStaticInitCheckInterceptor.recordConfigValue(injectionPoint, null);\n\n        try {\n            return ConfigProducerUtil.getValue(injectionPoint, ConfigProvider.getConfig());\n        } catch (Exception e) {\n            throw new DeploymentException(e);\n        }\n    }\n}\n","sourceCodeStart":7,"sourceCodeEnd":42,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ConfigPropertyCreator.java#L7-L42","documentation":"Thrown by ConfigPropertyCreator.create when Class.forName(requiredType, true, cl) fails for the type recorded at build time in the synthetic bean's parameters. The requiredType string was captured during deployment from the injection point's config property type; at runtime the thread-context classloader (falling back to the creator's own loader) cannot load that class, meaning the class was reachable at build time but is missing from the runtime classpath — usually caused by a dependency scope change or class relocation between build and run.","triggerScenarios":"Thrown at extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/ConfigPropertyCreator.java:25 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the artifact containing the property type is a runtime dependency, not compile-only or deployment-only","Check for class relocation or removal between the build-time and runtime artifacts of the affected extension","Confirm no custom classloader isolation excludes the class from the application runtime classpath"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}