quarkusio/quarkus · error · RuntimeException

java.lang.RuntimeException

Error message

java.lang.RuntimeException

What it means

CuratedApplication.createAugmentor loads io.quarkus.deployment.CodeGenerator/augmentor class (AUGMENTOR constant) reflectively from the augmentation classloader and instantiates it. Any failure — ClassNotFoundException, linkage errors, reflective instantiation problems — is wrapped in a plain RuntimeException, hiding the underlying cause.

Source

Thrown at independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/app/CuratedApplication.java:110

    public QuarkusBootstrap getQuarkusBootstrap() {
        return quarkusBootstrap;
    }

    public Object runInAugmentClassLoader(String consumerName, Map<String, Object> params) {
        return runInCl(consumerName, params, getOrCreateAugmentClassLoader());
    }

    public CurationResult getCurationResult() {
        return curationResult;
    }

    public AugmentAction createAugmentor() {
        try {
            Class<?> augmentor = getOrCreateAugmentClassLoader().loadClass(AUGMENTOR);
            return (AugmentAction) augmentor.getConstructor(CuratedApplication.class).newInstance(this);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    /**
     * This creates an augmentor, but uses the supplied class name to customise the build chain.
     *
     * The class name that is passed in must be the name of an implementation of
     * {@code Function<Map<String, Object>, List<Consumer<BuildChainBuilder>>>}
     * which is used to generate a list of build chain customisers to control the build.
     */
    @SuppressWarnings({ "unchecked", "rawtypes" })
    public AugmentAction createAugmentor(String functionName, Map<String, Object> props) {
        try {
            Class<?> augmentor = getOrCreateAugmentClassLoader().loadClass(AUGMENTOR);
            Function<Object, Object> function = (Function<Object, Object>) getOrCreateAugmentClassLoader()
                    .loadClass(functionName)
                    .getDeclaredConstructor()
                    .newInstance();

View on GitHub (pinned to e1c734241f)

Solutions

  1. Inspect the cause chain of the RuntimeException for the ClassNotFound/LinkageError
  2. Ensure quarkus-deployment and quarkus-core versions match in the dependency tree (mvn dependency:tree)
  3. Remove stale classpath caches so the augment classloader is rebuilt from current artifacts
  4. If using isolated deployment, verify all deployment dependencies are resolvable in the isolated classloader

Example fix

// before
<!-- mismatched versions -->
<dependency><groupId>io.quarkus</groupId><artifactId>quarkus-core</artifactId><version>3.0.0</version></dependency>
// after
<!-- aligned via BOM -->
<dependencyManagement><dependencies><dependency><groupId>io.quarkus.platform</groupId><artifactId>quarkus-bom</artifactId><version>3.x.y</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement>
Defensive patterns

Strategy: try-catch

Validate before calling

Class.forName("io.quarkus.deployment.builditem.AugmentResultBuildItem"); // probe deployment classes present
// and verify versions:
// mvn dependency:tree | grep quarkus-deployment

Try / catch

try {
    action = curatedApplication.createAugmentor();
} catch (RuntimeException e) {
    Throwable cause = e.getCause(); // ClassNotFoundException / LinkageError
    cause.printStackTrace();
}

Prevention

When it happens

Trigger: Calling createAugmentor() (directly or via app()/initAugmentAction()/handleDevServices()) when the augmentor class cannot be loaded from the augment classloader: missing quarkus-deployment classes, classloader isolation issues, or a constructor mismatch.

Common situations: Quarkus version mismatch (quarkus-core vs quarkus-deployment), the curated bootstrap being built with isolateDeployment=true while deployment classes are missing, corrupted dependency resolution, or running augmentation with an incomplete curated application.

Related errors


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