quarkusio/quarkus · critical · IOException

IOException(deploymentStatus)

Error message

IOException(deploymentStatus)

What it means

QuarkusHttpFunction.service throws an IOException whose message is the captured bootstrap log (deploymentStatus) when the Quarkus application failed to start in the static initializer. started remains false, so every HTTP invocation reports the startup stack trace instead of routing the request.

Source

Thrown at extensions/google-cloud-functions/runtime/src/main/java/io/quarkus/gcp/functions/QuarkusHttpFunction.java:71

            delegateClassLoader = Thread.currentThread().getContextClassLoader();
            try {
                Class<?> clazz = Class.forName(selectedDelegate, false, delegateClassLoader);
                delegate = (HttpFunction) Arc.container().instance(clazz).get();
            } catch (ClassNotFoundException e) {
                throw new RuntimeException(e);
            }
        }
    }

    static void clearState() {
        delegate = null;
        delegateClassLoader = null;
    }

    @Override
    public void service(HttpRequest httpRequest, HttpResponse httpResponse) throws Exception {
        if (!started) {
            throw new IOException(deploymentStatus);
        }

        // maybe we can check this at static init
        if (delegate == null) {
            throw new IOException("We didn't found any HttpFunction to run " +
                    "(or there is multiple one and none selected inside your application.properties)");
        }

        ClassLoader currentCl = Thread.currentThread().getContextClassLoader();
        try {
            Thread.currentThread().setContextClassLoader(delegateClassLoader);
            delegate.service(httpRequest, httpResponse);
        } finally {
            Thread.currentThread().setContextClassLoader(currentCl);
        }
    }
}

View on GitHub (pinned to e1c734241f)

Solutions

  1. Inspect the IOException message for the embedded bootstrap stack trace and fix that root cause
  2. Reproduce locally by running the built uber-jar with the Functions Framework to see startup logs
  3. Check quarkus.* configuration validity and that all CDI beans can be produced
  4. Ensure you deploy the uber-jar produced by the Quarkus GCP functions integration
Defensive patterns

Strategy: validation

Validate before calling

// run the packaged function jar locally and assert startup succeeded
java -jar target/my-function.jar &
sleep 5 && curl -sf http://localhost:8080/health || echo "bootstrap failed"

Try / catch

try {
    function.service(request, response);
} catch (IOException e) {
    if (e.getMessage().contains("Quarkus bootstrap failed")) {
        LOG.error("Startup failure:\n" + e.getMessage());
    } else throw e;
}

Prevention

When it happens

Trigger: Static-init bootstrap of io.quarkus.runner.ApplicationImpl threw (bad config, bean/CDI failure, missing dependency) and then an HTTP request arrives at service().

Common situations: Invalid quarkus.* properties, port/binding or extension startup failures, bean instantiation errors, or invoking the function without the Quarkus-generated uber-jar packaging.

Related errors


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