quarkusio/quarkus · error · RuntimeException
RuntimeException(e)
Error message
RuntimeException(e)
What it means
Thrown during QuarkusCloudEventsFunction.setDelegate when the class named by the quarkus.google-cloud-functions.deployment selected-delegate property cannot be loaded via Class.forName. It means the configured delegate class name does not exist on the delegate classloader.
Source
Thrown at extensions/google-cloud-functions/runtime/src/main/java/io/quarkus/gcp/functions/QuarkusCloudEventsFunction.java:57
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 = (CloudEventsFunction) Arc.container().instance(clazz).get();
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
}
public static void clearState() {
delegate = null;
delegateClassLoader = null;
}
@Override
public void accept(CloudEvent cloudEvent) throws Exception {
if (!started) {
throw new IOException(deploymentStatus);
}
// TODO maybe we can check this at static init
if (delegate == null) {
throw new IOException("We didn't found any CloudEventsFunction to run " +View on GitHub (pinned to e1c734241f)
Solutions
- Fix the fully-qualified class name in application.properties to exactly match your CloudEventsFunction implementation
- Confirm the class is included in the built uber-jar (quarkus.package.jar.type=uber-jar)
- Rebuild the project after any package rename so the generated metadata matches the new class name
Example fix
# before quarkus.google-cloud-functions.ce-function=io.acme.MyCloudFucntion # after quarkus.google-cloud-functions.ce-function=io.acme.MyCloudFunction
Defensive patterns
Strategy: validation
Validate before calling
// at startup, before deploy
String cls = "com.example.MyCloudEventsFunction";
try {
Class.forName(cls);
} catch (ClassNotFoundException e) {
throw new IllegalStateException("Delegate class not on classpath: " + cls);
} Try / catch
try {
QuarkusCloudEventsFunction.setDelegate(name);
} catch (RuntimeException e) {
if (e.getCause() instanceof ClassNotFoundException cnfe) {
throw new IllegalStateException("Check quarkus.google-cloud-functions config: " + cnfe.getMessage());
}
throw e;
} Prevention
- Copy the fully-qualified class name from the IDE, never type it by hand
- Grep application.properties for the delegate property after any package rename
- Confirm the class is in target/*-runner.jar (uber-jar) with jar tf
- Add a startup smoke test that loads the configured class by name
When it happens
Trigger: quarkus.google-cloud-functions... selected delegate property (application.properties) points to a class name that is misspelled, renamed, or not present in the deployed uber-jar when setDelegate runs.
Common situations: Typo in the fully-qualified class name in application.properties, refactoring/renaming the CloudEventsFunction class without updating the property, or the class being in a module not packaged in the function uber-jar.
Related errors
- We didn't found any CloudEventsFunction to run (or there is
- RuntimeException(e)
- IOException(deploymentStatus)
- We didn't found any HttpFunction to run (or there is multipl
- The Hibernate ORM configuration in Quarkus does not support
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/0591784ea23754f7.
Report an issue: GitHub.