{"record":{"id":"d5573e930bee000c","repo":"quarkusio/quarkus","slug":"support-for-list-of-objects-in-classes-annotated-w","errorCode":null,"errorMessage":"Support for List of objects in classes annotated with '@ConfigProperties' is only possible via the 'quarkus-config-yaml' extension. Offending field is ' + field.name() + ' of class ' + field.declaringClass().name().toString()","messagePattern":"Support for List of objects in classes annotated with '@ConfigProperties' is only possible via the 'quarkus-config-yaml' extension\\. Offending field is ' \\+ field\\.name\\(\\) \\+ ' of class ' \\+ field\\.declaringClass\\(\\)\\.name\\(\\)\\.toString\\(\\)","errorType":"exception","errorClass":"DeploymentException","httpStatus":null,"severity":"error","filePath":"extensions/spring-boot-properties/deployment/src/main/java/io/quarkus/spring/boot/properties/deployment/ClassConfigurationPropertiesUtil.java","lineNumber":383,"sourceCode":"                                    genericType, field.declaringClass().name(), bc, configParam,\n                                    (trueBranch, value) -> {\n                                        Expr optionalOf = trueBranch.invokeStatic(\n                                                MethodDesc.of(Optional.class, \"of\", Optional.class, Object.class),\n                                                value);\n                                        createWriteValue(trueBranch, configObject, field, fSetter, fUseFieldAccess,\n                                                optionalOf);\n                                    },\n                                    falseBranch -> {\n                                        // set Optional.empty if the value isn't set\n                                        Expr optionalEmpty = falseBranch.invokeStatic(\n                                                MethodDesc.of(Optional.class, \"empty\", Optional.class));\n                                        createWriteValue(falseBranch, configObject, field, fSetter, fUseFieldAccess,\n                                                optionalEmpty);\n                                    });\n                        }\n                    } else if (ConfigurationPropertiesUtil.isListOfObject(fieldType)) {\n                        if (!capabilities.isPresent(Capability.CONFIG_YAML)) {\n                            throw new DeploymentException(\n                                    \"Support for List of objects in classes annotated with '@ConfigProperties' is only possible via the 'quarkus-config-yaml' extension. Offending field is '\"\n                                            + field.name() + \"' of class '\" + field.declaringClass().name().toString());\n                        }\n                        Expr setterValue = yamlListObjectHandler.handle(new YamlListObjectHandler.FieldMember(field),\n                                bc, configParam,\n                                getEffectiveConfigName(namingStrategy, field), fullConfigName);\n                        createWriteValue(bc, configObject, field, setter, useFieldAccess, setterValue);\n                    } else {\n                        ConfigurationPropertiesUtil.registerImplicitConverter(fieldType, reflectiveClasses);\n                        populateTypicalProperty(bc, configObject, configPropertyBuildItemCandidates,\n                                currentClassInHierarchy, field, useFieldAccess, fieldType, setter, configParam,\n                                fullConfigName);\n                    }\n                }\n            }\n\n            ConfigPropertyBuildItemCandidateUtil.removePropertiesWithDefaultValue(classLoader,\n                    currentClassInHierarchy.name().toString(),","sourceCodeStart":365,"sourceCodeEnd":401,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/spring-boot-properties/deployment/src/main/java/io/quarkus/spring/boot/properties/deployment/ClassConfigurationPropertiesUtil.java#L365-L401","documentation":"This build-time error is thrown by the Quarkus spring-boot-properties extension when a @ConfigurationProperties class (Spring-style) contains a field that is a List of custom objects (e.g. List<Nested>) but the 'quarkus-config-yaml' extension is not present. The code generator can only emit mapping logic for lists of objects via the YAML config machinery, so without that capability the build fails with a DeploymentException naming the offending field and class.","triggerScenarios":"A class annotated with Spring's @ConfigurationProperties has a field of type List<SomePojo> (non-primitive element type) and the application's dependencies do not include quarkus-config-yaml; the error fires during populateConfigObject while generating the config class population bytecode in the deployment phase.","commonSituations":"Migrating a Spring Boot app with nested list properties (e.g. app.servers[0].host=...) to Quarkus; adding a nested-object list to an existing properties class; a starter/extension set that omits quarkus-config-yaml.","solutions":["Add the quarkus-config-yaml extension: ./mvnw quarkus:add-extension -Dextensions='quarkus-config-yaml' (or add io.quarkus:quarkus-config-yaml to pom.xml).","Restructure the property class to avoid List of objects, e.g. use Map<String, Nested> or a yaml-friendly mapping style, or flatten the properties.","If the list elements are simple types (String, Integer), keep them — only lists of custom objects are restricted."],"exampleFix":"// before (pom.xml, no yaml extension)\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-spring-boot-properties</artifactId>\n</dependency>\n\n// after\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-spring-boot-properties</artifactId>\n</dependency>\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-config-yaml</artifactId>\n</dependency>","handlingStrategy":"validation","validationCode":"// build-time guard: ensure yaml extension is present when using List-of-object config fields\nboolean needsYaml = configClassFields.stream()\n    .anyMatch(f -> List.class.isAssignableFrom(f.getType())\n        && !isSimpleType(f.getType().getGenericSuperclass()));\nif (needsYaml && !dependencies.contains(\"io.quarkus:quarkus-config-yaml\")) {\n    throw new IllegalStateException(\"Add quarkus-config-yaml for List-of-object config fields\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include quarkus-config-yaml when using Spring Boot-style nested list properties","Prefer Map<String, Nested> over List<Nested> for nested config objects","Run the Quarkus build early after adding config classes to catch this at compile time"],"tags":["quarkus","build-time","config-properties","deployment-exception"],"backgroundTag":"missing-extension-dependency","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}