quarkusio/quarkus · error · CodestartException

Unsupported config type: + configType

Error message

Unsupported config type: + configType

What it means

SmartConfigMergeCodestartFileStrategyHandler throws CodestartException when the config file being smart-merged has a configType it cannot render. It supports a small set (e.g. properties and 'config-yaml'); any other config type reaches the terminal throw. This is a library capability limit, not a user file conflict.

Source

Thrown at independent-projects/tools/codestarts/src/main/java/io/quarkus/devtools/codestarts/core/strategy/SmartConfigMergeCodestartFileStrategyHandler.java:61

        for (TargetFile codestartFile : codestartFiles) {
            final String content = codestartFile.getContent();
            if (!content.trim().isEmpty()) {
                final Map<String, Object> o = YAML_MAPPER.readerFor(Map.class).readValue(content);
                config.putAll(NestedMaps.deepMerge(config, o));
            }
        }
        final String resolvedRelativePath = resolveConfigPath(relativePath, data);
        final Path targetPath = targetDirectory.resolve(resolvedRelativePath);
        createDirectories(targetPath);
        if (Objects.equals(configType, "config-properties")) {
            writePropertiesConfig(targetPath, config);
            return;
        }
        if (Objects.equals(configType, "config-yaml")) {
            writeYamlConfig(targetPath, config);
            return;
        }
        throw new CodestartException("Unsupported config type: " + configType);
    }

    private void writeYamlConfig(Path targetPath, Map<String, Object> config) throws IOException {
        checkTargetDoesNotExist(targetPath);
        YAML_MAPPER.writerFor(Map.class).writeValue(targetPath.toFile(), config);
    }

    private void writePropertiesConfig(Path targetPath, Map<String, Object> config) throws IOException {
        final StringBuilder builder = new StringBuilder();
        // Enforce properties are in consistent order.
        final TreeMap<String, String> flat = new TreeMap<>();
        flatten("", flat, config);
        for (Map.Entry<String, String> entry : flat.entrySet()) {
            final String key = entry.getKey().replaceAll("\\.~$", "");
            builder.append(key).append("=").append(entry.getValue()).append("\n");
        }
        final Path propertiesTargetPath = targetPath.getParent()
                .resolve(targetPath.getFileName().toString().replace(".yml", ".properties"));

View on GitHub (pinned to e1c734241f)

Solutions

  1. Convert the config file to a supported type (properties or config-yaml) in the codestart
  2. Use a different output strategy (override/copy) for that file instead of smart-config-merge
  3. Upgrade Quarkus — newer versions may support additional config types

Example fix

// before
codestart file: src/main/resources/application.json (smart-config-merge)

// after
codestart file: src/main/resources/application.yaml (config-yaml, smart-config-merge)
Defensive patterns

Strategy: validation

Validate before calling

Set<String> SUPPORTED = Set.of("properties", "config-yaml");
if (!SUPPORTED.contains(configType))
    throw new IllegalStateException("smart-config-merge unsupported type: " + configType);

Try / catch

try {
    handler.process(targetDir, relativePath, codestartFiles, data);
} catch (CodestartException e) {
    if (e.getMessage().startsWith("Unsupported config type")) {
        // convert file to properties/yaml or switch to a copy/override strategy
    } else throw e;
}

Prevention

When it happens

Trigger: Applying the smart-config-merge strategy to a config file whose detected/declared configType is not one of the supported types (not properties, not 'config-yaml') — e.g. json, toml, or a custom type string.

Common situations: A codestart ships application.json or config in an unsupported format while using smart-merge; a custom configType string added in a codestart definition that the handler does not know.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/c1b44ed3215d9e5e. Report an issue: GitHub.