quarkusio/quarkus · error · RuntimeException
RuntimeException(e)
Error message
RuntimeException(e)
What it means
Thrown during QuarkusHttpFunction.setDelegate when the class name configured as the selected HttpFunction delegate cannot be loaded via Class.forName from the delegate classloader. It is a wrapper around ClassNotFoundException indicating a bad or stale delegate class name.
Source
Thrown at extensions/google-cloud-functions/runtime/src/main/java/io/quarkus/gcp/functions/QuarkusHttpFunction.java:58
ex.printStackTrace(errorWriter);
} finally {
Thread.currentThread().setContextClassLoader(currentCl);
}
} else {
errorWriter.println("Quarkus bootstrapped successfully.");
started = true;
}
deploymentStatus = error.toString();
}
static void setDelegate(String selectedDelegate) {
if (selectedDelegate != null) {
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 " +View on GitHub (pinned to e1c734241f)
Solutions
- Correct the fully-qualified class name of the HttpFunction in application.properties
- Rebuild the uber-jar so the class is present at deploy time
- If you renamed the class, update any generated function entry-point config that referenced the old name
Example fix
# before quarkus.google-cloud-functions.function=io.acme.MyHttpFuntion # after quarkus.google-cloud-functions.function=io.acme.MyHttpFunction
Defensive patterns
Strategy: validation
Validate before calling
String cls = "com.example.MyHttpFunction";
try {
Class.forName(cls);
} catch (ClassNotFoundException e) {
throw new IllegalStateException("HttpFunction delegate not found: " + cls);
} Try / catch
try {
QuarkusHttpFunction.setDelegate(name);
} catch (RuntimeException e) {
if (e.getCause() instanceof ClassNotFoundException cnfe) {
throw new IllegalStateException("Bad delegate class name in config: " + cnfe.getMessage());
}
throw e;
} Prevention
- Use the exact FQCN from the IDE when setting the delegate property
- Re-check the property after refactors that move or rename the class
- Verify the built uber-jar contains the class (jar tf)
- Cover delegate loading in an integration test
When it happens
Trigger: The configured selected-delegate property for HTTP functions references a class that is misspelled, was renamed, or is absent from the deployed uber-jar.
Common situations: Typos in application.properties, refactoring the HttpFunction class without updating config, deploying a thin jar or artifact that does not contain the class.
Related errors
- RuntimeException(e)
- We didn't found any HttpFunction to run (or there is multipl
- We didn't found any CloudEventsFunction to run (or there is
- IOException(deploymentStatus)
- IOException(deploymentStatus)
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/24478eb1642ecf0a.
Report an issue: GitHub.