quarkusio/quarkus · error · RuntimeException

${misalignmentReport}

Error message

${misalignmentReport}

What it means

When the application's resolved platform imports (e.g. quarkus-bom versions) do not match the versions the Quarkus platform expects, and quarkus.bootstrap.misaligned-platform-imports=error, validateAndGet throws a RuntimeException containing the generated misalignment report. This guards against builds mixing Quarkus extension versions from different releases.

Source

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

     * The behavior in case of misalignment depends on the provided {@link BootstrapConfig#misalignedPlatformImports()}:
     * <ul>
     * <li><b>ERROR</b>: Throws a {@link RuntimeException}.</li>
     * <li><b>WARN</b>: Logs a warning.</li>
     * <li><b>IGNORE</b>: Skips validation entirely.</li>
     * </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. Align all quarkus-* dependencies with a single platform BOM version (import io.quarkus.platform:quarkus-bom of one release).
  2. Set -Dquarkus.bootstrap.misaligned-platform-imports=warn or =ignore to downgrade/skip the check (only if you understand the risk).
  3. Read the report in the message to find which artifacts are misaligned and fix those versions in dependencyManagement.

Example fix

// before (pom.xml)
<dependency><groupId>io.quarkus</groupId><artifactId>quarkus-resteasy</artifactId><version>3.99.0</version></dependency>
// after
<dependencyManagement><dependencies><dependency>
  <groupId>io.quarkus.platform</groupId><artifactId>quarkus-bom</artifactId>
  <version>3.15.1</version><type>pom</type><scope>import</scope>
</dependency></dependencies></dependencyManagement>
Defensive patterns

Strategy: validation

Validate before calling

mvn dependency:tree -Dincludes=io.quarkus
// verify all quarkus-* artifacts share one platform version before building

Try / catch

try {
    appModelProvider.validateAndGet(bootstrapConfig);
} catch (RuntimeException e) {
    // report lists misaligned artifacts; align versions or set misaligned-platform-imports=warn
}

Prevention

When it happens

Trigger: quarkus.bootstrap.misaligned-platform-imports is set to ERROR (or unset, depending on default) and appModel.getPlatforms().isAligned() returns false — typically after overriding a quarkus-* extension version in the pom or importing a BOM of a different Quarkus release.

Common situations: Manually pinning a newer quarkus-something while the platform BOM pins another; mixing Quarkus LTS and non-LTS platform BOMs; dependencyManagement overrides in a multi-module project.

Related errors


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