quarkusio/quarkus · error · IllegalArgumentException

Unsupported naming strategy:

Error message

Unsupported naming strategy: 

What it means

Thrown when the naming strategy value declared on a @ConfigurationProperties class is not one of the supported strategies (KEBAB_CASE, SNAKE_CASE, etc.). getName() switches over the strategy and hits the default branch, throwing IllegalArgumentException with the unsupported strategy name.

Source

Thrown at extensions/spring-boot-properties/deployment/src/main/java/io/quarkus/spring/boot/properties/deployment/ClassConfigurationPropertiesUtil.java:500

        }
        return getName(nameToUse, namingStrategy);
    }

    static String getName(String nameToUse, ConfigMapping.NamingStrategy namingStrategy) {
        switch (namingStrategy) {
            case KEBAB_CASE:
                return StringUtil.hyphenate(nameToUse);
            case VERBATIM:
                return nameToUse;
            case SNAKE_CASE:
                return String.join("_", new Iterable<String>() {
                    @Override
                    public Iterator<String> iterator() {
                        return StringUtil.lowerCase(StringUtil.camelHumpsIterator(nameToUse));
                    }
                });
            default:
                throw new IllegalArgumentException("Unsupported naming strategy: " + namingStrategy);
        }
    }

    private static void createWriteValue(BlockCreator bc, Expr configObject, FieldInfo field,
            MethodInfo setter, boolean useFieldAccess, Expr value) {
        if (useFieldAccess) {
            createFieldWrite(bc, configObject, field, value);
        } else {
            createSetterCall(bc, configObject, setter, value);
        }
    }

    private static void createSetterCall(BlockCreator bc, Expr configObject,
            MethodInfo setter, Expr value) {
        bc.invokeVirtual(Jandex2Gizmo.methodDescOf(setter), configObject, value);
    }

    private static void createFieldWrite(BlockCreator bc, Expr configObject,

View on GitHub (pinned to e1c734241f)

Solutions

  1. Set namingStrategy to one of the supported values (KEBAB_CASE, SNAKE_CASE, etc. as exposed by the annotation's NamingStrategy enum).
  2. Remove the namingStrategy attribute entirely to use the default strategy.
  3. Check the Quarkus version docs — the accepted values are the extension's own enum, not Spring's PropertyNamingStrategy.

Example fix

// before
@ConfigurationProperties(prefix = "app", namingStrategy = ConfigurationProperties.NamingStrategy.CamelCase)
class AppProps { ... }

// after
@ConfigurationProperties(prefix = "app", namingStrategy = ConfigurationProperties.NamingStrategy.KEBAB_CASE)
class AppProps { ... }
Defensive patterns

Strategy: validation

Validate before calling

// validate namingStrategy against supported set before build
Set<String> supported = Set.of("KEBAB_CASE", "SNAKE_CASE");
if (namingStrategy != null && !supported.contains(namingStrategy)) {
    throw new IllegalArgumentException("Unsupported namingStrategy: " + namingStrategy);
}

Prevention

When it happens

Trigger: An @ConfigurationProperties annotation specifies namingStrategy with a value outside the allowed enum set — e.g. a typo, a custom string, or a strategy copied from Spring Boot that Quarkus does not implement; raised during getEffectiveConfigName while generating config population code.

Common situations: Copying Spring Boot PropertyNamingStrategy values (like CamelCase or LowerCamelCase) that Quarkus does not support; misspelling the strategy constant after a refactor; upgrading Quarkus and the strategy value changed/deprecated.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


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