quarkusio/quarkus · error · RuntimeException

Unrecognized option for quarkus.bootstrap.misaligned-platfor

Error message

Unrecognized option for quarkus.bootstrap.misaligned-platform-imports: ${misalignedPlatformImports}

What it means

quarkus.bootstrap.misaligned-platform-imports only accepts ERROR, WARN, or IGNORE (case as parsed into BootstrapConfig.MisalignedPlatformImports). Any other value reaches the default branch of the switch in validateAndGet and throws a RuntimeException naming the unrecognized option.

Source

Thrown at core/deployment/src/main/java/io/quarkus/deployment/builditem/AppModelProviderBuildItem.java:61

     * </ul>
     *
     * @param config the bootstrap configuration
     * @return the validated application model
     * @throws RuntimeException if platform imports are misaligned and the configuration is set to {@code ERROR}
     *         or if the configuration is unrecognized.
     */
    public ApplicationModel validateAndGet(BootstrapConfig config) {
        final PlatformImports platforms = appModel.getPlatforms();
        if (platforms != null && !BootstrapConfig.MisalignedPlatformImports.IGNORE.equals(config.misalignedPlatformImports())
                && !platforms.isAligned()) {
            switch (config.misalignedPlatformImports()) {
                case ERROR:
                    throw new RuntimeException(platforms.getMisalignmentReport());
                case WARN:
                    log.warn(platforms.getMisalignmentReport());
                    break;
                default:
                    throw new RuntimeException("Unrecognized option for quarkus.bootstrap.misaligned-platform-imports: "
                            + config.misalignedPlatformImports());
            }
        }
        return appModel;
    }

    public Supplier<DependencyInfoProvider> getDependencyInfoProvider() {
        return depInfoProvider;
    }
}

View on GitHub (pinned to e1c734241f)

Solutions

  1. Set the property to one of: error, warn, or ignore (case-insensitive as parsed by the enum).
  2. Remove the property entirely to use the default behavior.
  3. Check for stray whitespace or quotes in the configured value in application.properties or the environment.

Example fix

// before (application.properties)
quarkus.bootstrap.misaligned-platform-imports=silent
// after
quarkus.bootstrap.misaligned-platform-imports=warn
Defensive patterns

Strategy: validation

Validate before calling

String v = System.getProperty("quarkus.bootstrap.misaligned-platform-imports");
if (v != null && !Set.of("error","warn","ignore").contains(v.toLowerCase())) {
    throw new IllegalArgumentException("Invalid misaligned-platform-imports value: " + v);
}

Type guard

static boolean isMisalignedOptionValid(String v) {
    return v == null || v.equalsIgnoreCase("error") || v.equalsIgnoreCase("warn") || v.equalsIgnoreCase("ignore");
}

Prevention

When it happens

Trigger: Setting quarkus.bootstrap.misaligned-platform-imports in application.properties, build system properties, or environment (QUARKUS_BOOTSTRAP_MISALIGNED_PLATFORM_IMPORTS) to a value that is not error/warn/ignore.

Common situations: Typo such as 'Warning', 'silent', or 'false'; quoting mistakes in properties; passing an uppercase-only env var with an unexpected string.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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