{"record":{"id":"42b0f45caf198137","repo":"quarkusio/quarkus","slug":"unable-to-load-the-config-property-type-classna","errorCode":null,"errorMessage":"Unable to load the config property type: ${className}","messagePattern":"Unable to load the config property type: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/MicroProfileConfigRecorder.java","lineNumber":119,"sourceCode":"            case \"short\":\n                return short.class;\n            case \"int\":\n                return int.class;\n            case \"long\":\n                return long.class;\n            case \"float\":\n                return float.class;\n            case \"double\":\n                return double.class;\n            case \"char\":\n                return char.class;\n            case \"void\":\n                return void.class;\n            default:\n                try {\n                    return Class.forName(className, true, cl);\n                } catch (ClassNotFoundException e) {\n                    throw new IllegalStateException(\"Unable to load the config property type: \" + className, e);\n                }\n        }\n    }\n\n    public static class ConfigValidationMetadata {\n        private final String name;\n        private final String rawTypeName;\n        private final List<String> actualTypeArgumentNames;\n        private final String defaultValue;\n\n        @RecordableConstructor\n        public ConfigValidationMetadata(final String name, final String rawTypeName, final List<String> actualTypeArgumentNames,\n                final String defaultValue) {\n            this.name = name;\n            this.rawTypeName = rawTypeName;\n            this.actualTypeArgumentNames = actualTypeArgumentNames;\n            this.defaultValue = defaultValue;\n        }","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/MicroProfileConfigRecorder.java#L101-L137","documentation":"MicroProfileConfigRecorder.load converts a config property type name into a Class via Class.forName; when the type cannot be resolved it throws this IllegalStateException naming the type. This happens during build-time registration/validation of @ConfigProperties. The ClassNotFoundException is chained for diagnosis.","triggerScenarios":"A @ConfigProperties class (or validateConfigProperties/registerConfigProperties input) references a property type whose class name is not visible to the recorder's classloader — e.g. a primitive-mapped name typo or a class not on the deployment classpath.","commonSituations":"Referencing a type from an extension module missing at build time; typos in generated/derived class names; classloader split issues between deployment and runtime modules; renaming a config class without a clean rebuild.","solutions":["Ensure the type referenced by the config property is on the application/deployment classpath and spelled correctly","Clean rebuild the application so stale generated metadata referencing renamed types is refreshed","If the type is a primitive or array, confirm the recorder input uses the expected JVM name form","Check that the ConfigValidationMetadata was produced in the same build as the config class"],"exampleFix":"// before\n@ConfigProperties(prefix = \"app\")\npublic class MyAppConfig {\n    public SomeMissingType value; // class not on build classpath\n}\n// after\nimport com.example.SomeType;\n@ConfigProperties(prefix = \"app\")\npublic class MyAppConfig {\n    public SomeType value;\n}","handlingStrategy":"validation","validationCode":"for (String typeName : referencedConfigTypes) {\n    try { Class.forName(typeName, false, cl); }\n    catch (ClassNotFoundException e) {\n        throw new IllegalStateException(\"Config property type not on build classpath: \" + typeName, e);\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    recorder.registerConfigProperties(...);\n} catch (IllegalStateException e) {\n    logger.error(\"Fix or remove the unresolvable config property type\", e);\n}","preventionTips":["Keep all config classes in modules visible to the deployment classloader","Clean-rebuild after renaming config classes so recorded metadata stays fresh","Avoid storing class names as strings in generated config metadata unless the classes are guaranteed present"],"tags":["quarkus","config","microprofile-config","classpath","build-time"],"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"}