quarkusio/quarkus · error · DeploymentException

Deployment failed

Error message

Deployment failed

What it means

The ArC Arquillian Deployer wraps any IOException, ExecutionException or InterruptedException occurring during archive explosion or code generation into a DeploymentException with message 'Deployment failed', preserving the original cause. It signals that the test deployment could not be materialized to disk. The root cause is always attached, so examine the cause for the real problem.

Source

Thrown at independent-projects/arc/tcks/arquillian/src/main/java/io/quarkus/arc/arquillian/Deployer.java:72

        this.deploymentDir = deploymentDir;
        this.testClass = testClass;
    }

    DeploymentClassLoader deploy() throws DeploymentException {
        try {
            if (deploymentArchive instanceof JavaArchive) {
                explodeJar();
            } else if (deploymentArchive instanceof WebArchive) {
                explodeWar();
            } else {
                throw new DeploymentException("Unknown archive type: " + deploymentArchive);
            }

            generate();

            return new DeploymentClassLoader(deploymentDir);
        } catch (IOException | ExecutionException | InterruptedException e) {
            throw new DeploymentException("Deployment failed", e);
        }
    }

    private void explodeJar() throws IOException {
        Archives.explode(deploymentArchive, "/", deploymentDir.appClasses);

        BeanArchive beanArchive = BeanArchive.detect(deploymentArchive);
        if (beanArchive != null) {
            beanArchives.add(beanArchive);
        }
    }

    private void explodeWar() throws IOException {
        Archives.explode(deploymentArchive, "/WEB-INF/classes/", deploymentDir.appClasses);

        BeanArchive beanArchive = BeanArchive.detect(deploymentArchive);
        if (beanArchive != null) {
            beanArchives.add(beanArchive);

View on GitHub (pinned to e1c734241f)

Solutions

  1. Read the cause chain of the DeploymentException to find the underlying IOException/ExecutionException.
  2. Check that the temp deployment directory is writable and does not contain stale files from previous runs.
  3. Ensure no other process holds locks on the deployment directory (CI stale workspaces).
  4. Re-run after fixing; if interrupted, avoid interrupting the test thread during deployment.

Example fix

// before
// deploymentDir from previous failed run not cleaned
// after
FileUtils.deleteQuietly(deploymentDir.toFile()); // or a fresh dir per run
deployer.deploy(jar);
Defensive patterns

Strategy: try-catch

Validate before calling

Objects.requireNonNull(archive, "archive");
if (!deploymentDir.toFile().canWrite()) throw new IllegalStateException("deployment dir not writable: " + deploymentDir);

Try / catch

try {
    return deployer.deploy(archive);
} catch (DeploymentException e) {
    LOG.error("Deployment failed; root cause:", e.getCause());
    throw new RuntimeException("Deployment failed, see cause", e);
}

Prevention

When it happens

Trigger: deploy() throws when Archives.explode, the async generation task, or DeploymentClassLoader construction throws IOException/ExecutionException/InterruptedException — e.g. disk I/O failure, missing generated resources, or interrupted thread.

Common situations: Read-only or full temp directory, leftover deployment directories with stale files, underlying generation task failing asynchronously, or test threads interrupted during parallel test runs.

Related errors


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